forked from jimschubert/NewTab-Redirect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.html
204 lines (189 loc) · 12.9 KB
/
options.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!DOCTYPE html>
<html lang="en" ng-app="newTab">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>New Tab Redirect</title>
<script type="text/javascript" src="js/vendor/angular/angular-loader.min.js"></script>
<link rel="stylesheet" href="css/font-awesome.min.css" type="text/css">
<link rel="stylesheet" href="css/common.css" type="text/css">
<link rel="stylesheet" href="css/options.css" type="text/css">
</head>
<body class="options-page">
<div ng-cloak>
<div class="main-container" ng-controller="OptionsController">
<div class="app-header">
<span class="app-logo"><a href="options.html" target="_self"><i class="fa"> </i> New Tab Redirect Options</a></span>
<span class="webstore"><a href="https://chrome.google.com/webstore" target="_self" class="plain"><i class="fa" style="background:url('chrome://favicon/https://chrome.google.com/webstore/category/apps') no-repeat;"></i> <x data-role="store">Chrome Web Store</x></a></span>
</div>
<div class="container options-container">
<ul class="options-tabs">
<li ng-class="{'selected': selected === 'url'}"><a ng-click="selected='url'">URL</a></li>
<li ng-class="{'selected': selected === 'permissions'}"><a ng-click="selected='permissions'">Permissions</a></li>
<li ng-class="{'selected': selected === 'contact'}"><a ng-click="selected='contact'">Contact</a></li>
<li ng-class="{'selected': selected === 'donate'}"><a ng-click="selected='donate'">Donate</a></li>
</ul>
<div class="target">
<div ng-show="selected=='url'">
<h2>Redirect URL</h2>
<input name="url" type="search" ng-model="url" placeholder="Default: New Tab Redirect 'Apps' Page" style="min-width:250px;" />
<button style="font-weight:bold" title="Save" ng-click="save()">Save</button>
<button title="Cancel" ng-click="cancel()">Cancel</button>
<button title="One-time get Synced URL" ng-click="getSyncedUrl()" class="fa fa-cloud-download"></button>
<p>
<label>
<input type="checkbox" ng-model="alwaysTabUpdate" ng-change="changeRedirect(alwaysTabUpdate)"> Always update tab, not redirect. <small>(Enable for cursor in the address bar)</small>
</label>
</p>
<p>
<label>
<input type="checkbox" ng-model="sync" ng-change="changeSync(sync)"> Sync this URL across browsers?
</label>
</p>
<h3>One click save...</h3>
<div class="column2">
<h4>Popular Pages</h4>
<div ng-repeat="page in popular">
<a href="{{page.location}}" class="bookmark" style="font-size:1.1em" ng-click="quickSave(page.location, $event)">
<i class="fa" style="background:url('chrome://favicon/{{page.location}}') no-repeat"></i>
<span ng-bind="page.name"></span>
</a>
</div>
<h4>Chrome Pages</h4>
<div ng-repeat="page in internal">
<a href="{{page.location}}" class="bookmark" style="font-size:1.1em" ng-click="quickSave(page.location, $event)">
<i class="fa" style="background:url('chrome://favicon/{{page.location}}') no-repeat"></i>
<span ng-bind="page.name"></span>
</a>
</div>
</div>
</div>
<div ng-show="selected=='permissions'">
<h2>Permissions</h2>
<p>
For information regarding what these permissions mean, please research:
</p>
<ul>
<li>
<a href="http://developer.chrome.com/extensions/permission_warnings" target="_blank">Chrome extensions: permission warnings</a>
</li>
<li>
<a href="https://support.google.com/chrome_webstore/answer/186213?hl=en" target="_blank">
Chrome Web Store Help: Permissions requested by apps and extensions
</a>
</li>
</ul>
<p>
If you have any doubts or questions, email me at james.schubert@gmail.com.
</p>
<p>
Never enable permissions you don't trust or don't understand, it can be dangerous.
</p>
<h3>Required Permissions</h3>
<ul>
<li ng-repeat="req in required_permissions"><span ng-bind="req"></span></li>
</ul>
<h3>Optional Permissions</h3>
<ul>
<li ng-repeat="perm in optional_permissions">
<span ng-bind="perm" style="width:90px;display:inline-block;"></span> <button ng-click="grant(perm)" ng-disabled="permissions[perm]">Approve</button> <button ng-click="deny(perm)" ng-disabled="!permissions[perm]">Deny</button>
</li>
</ul>
<h3>Where these are used</h3>
<p>
The <em>required permissions</em> are used mostly by the options page.
</p>
<p>
They allow the extension to display icons and save data either locally or to your Google Account (if you've enabled syncing in your browser and enabled extension syncing).
</p>
<p>
The <em>optional permissions</em> are used by the custom new tab 'Apps' page.
</p>
<p>
All of the optional permissions provide more functionality than the 'Apps' page needs, but extensions have to select permissions in their entirety for even a small subset of abilities. Here's how the 'Apps' page uses them.
</p>
<dl>
<dt>
<em>tabs</em>: <strong>"Access your tabs and browsing activity"</strong>
</dt>
<dd>
The 'tabs' permission is used to open apps in a new window (available in the rollover links). It's a nice-to-have feature, but is not necessary. If you don't trust this permission, leave it disabled. Only power users would be opening apps in new windows. See the <a href="http://developer.chrome.com/extensions/tabs" title="tabs summary" target="_blank">development documents</a> for more.
</dd>
<dt>
<em>topSites</em>: <strong>"Read and modify your browsing history"</strong>
</dt>
<dd>
This permission is bundled in the same warning as the history permission (which isn't used by this extension). The 'topSites' permission simply allows getting the top 20 most visited sites. The warning you get when enabling this permission is silly because it can't read any more of your history than the recent sites, and has no way to modify your history. See the <a href="http://developer.chrome.com/extensions/topSites" title="topSites summary" target="_blank">development documents</a> for more.
</dd>
<dt>
<em>management</em>: <strong>"Manage your apps, extensions, and themes"</strong>
</dt>
<dd>
The custom 'Apps' page only needs the 'apps' part of this permission. In fact, I have to filter out extensions and themes because everything is returned in the query. By 'manage', this means the extension can allow you to view, create, edit, or delete apps. Currently, the custom 'Apps' page retrieves apps and allows you to uninstall apps directly from within the 'Apps' page. You're provided confirmation. Generally, you should be cautious about enabling this permission in extensions, because it also allows extensions to install apps or uninstall the extension itself. Unfortunately, the permission is all or nothing, otherwise I'd request the bare minimum. This is the only required permission for the custom 'Apps' page to make sense. See the <a href="http://developer.chrome.com/extensions/management" title="management summary" target="_blank">development documents</a> for more.
</dd>
<dt>
<em>bookmarks</em>: <strong>"Read and modify your bookmarks"</strong>
</dt>
<dd>
Again, an all-or-nothing permission. The 'Apps' page can display between 5 and 40 bookmarks from your bookmarks bar. There's no modification going on. See the <a href="http://developer.chrome.com/extensions/bookmarks" title="bookmarks summary" target="_blank">development documents</a> for more.
</dd>
</dl>
</div>
<div ng-show="selected=='donate'" >
<h2>Donate!</h2>
<p>
Some users insisted in 2011 or 2012 that I accept donations. I'm a full-time software engineer and I created this extension as a fun project, so I was reluctant to comply. I'd be just as happy with a nice email or a follow on Twitter. But, if you like the extension <em>that much</em> you can donate $1 or so to buy me a coffee. That's what usually fuels my development.
</p>
<ng-include src="'js/partials/donate.html'" />
</div>
<div ng-show="selected=='contact'">
<h2><span class="github-icon">Bugs or Features</span></h2>
<p>
Please post any new bugs or feature requests to <a href="http://bit.ly/1mU2Ww3" target="_blank">github</a>.
</p>
<p>There's a chance that your question is already answered in the <a href="http://bit.ly/Qw6rus"
target="_blank">FAQ</a>, so
check there before reporting an issue.
</p>
<p><strong>NOTE</strong> I have no control over how Chrome highlights or focuses the address bar with this extension.</p>
<p>
Also, feel free to fork the code and contribute.
</p>
<h2><span class="twitter-icon">Twitter</span></h2>
<p>I tweet sometimes from <a href="http://bit.ly/1mU2ZI7">@jimschubert</a>. I'm not as active as
most people on twitter, and most of the content is related to computer programming.</p>
<h2><span class="google-icon">Email</span></h2>
<p>You're welcome to <a href="mailto:james.schubert@gmail.com">email me</a> or chat with me on Google (james.schubert@gmail.com).
</p>
</div>
</div>
<span class="clear"></span>
<div class="saved" ng-class="{'show-saved': show_saved }">
<div class="saved-container">Options saved!</div>
</div>
</div>
</div>
</div>
<footer>
<div style="float:left;">
<p>
<a href="http://www.ipreferjim.com">© James Schubert, 2009-2019</a>
|
<a href="http://github.com/jimschubert/newtab-redirect" target="_blank">Report bugs</a>
|
<a href="https://groups.google.com/forum/#!forum/new-tab-redirect-beta-testers" target="_blank">Beta test</a>
|
<a href="welcome.html" target="_blank">'Welcome'</a>
</p>
</div>
</footer>
<script type="text/javascript" src="js/vendor/angular/angular.min.js"></script>
<script type="text/javascript" src="js/controllers.js"></script>
<script type="text/javascript" src="js/options_constants.js"></script>
<script type="text/javascript" src="js/options_controller.js"></script>
<script type="text/javascript" src="js/directives.js"></script>
<script type="text/javascript" src="js/filters.js"></script>
<script type="text/javascript" src="js/services.js"></script>
<script type="text/javascript" src="js/app.js"></script>
</body>
</html>