-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathsettings.html
322 lines (253 loc) · 12.7 KB
/
settings.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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/crypto_sha1.js"></script>
<script src="js/lib.js"></script>
<script src="js/settings.js"></script>
<script src="https://platform.twitter.com/widgets.js"></script>
<title>Staying Alive Settings</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="twitter:widgets:csp" content="on">
<!-- Bootstrap -->
<link href="css/bootstrap.css" rel="stylesheet" media="screen">
<link href="css/settings.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="mycontainer">
<h1 class="settings">Staying Alive Settings</h1>
<div class="row">
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-heading">Rules</div>
<div class="panel-body">
<div class="list-group" id="rules_list">
</div>
<button type="button" id="create_rule">
<span class="glyphicon glyphicon-plus"></span> Create New Rule
</button>
</div>
</div>
</div>
<div class="col-md-6">
<div class="well" id="no_rule">
Select a Rule to edit or<br>
Click <strong>"Create New Rule"</strong> button to add new rule
</div>
<div id="rule_form" class="rule_form hidden">
<div class="panel panel-default">
<div class="panel-heading">Rule Name</div>
<div class="panel-body">
<input type="hidden" id="rule_id" value="h23434">
<div class="form-group">
<label for="rule_name">Rule Name</label>
<input type="text" class="form-control" id="rule_name"
placeholder="Assign a short name for this rule">
<p class="text-info">Rule will be identified by this name.</p>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Background Request Options</div>
<div class="panel-body">
<div class="form-group">
<label for="trigger_uri">Trigger Url</label>
<input type="text" class="form-control" id="trigger_uri"
placeholder="Requesting this url from browser will trigger background request loop">
<p class="text-info">Requesting this url from browser will start the background request
loop.</p>
</div>
<div class="form-group">
<label for="loop_uri">Background Request Url</label>
<input type="text" class="form-control" id="loop_uri"
placeholder="This url will be requested in background">
<p class="text-info">Optional. If not specified will use Trigger Url</p>
</div>
<div class="request_interval">
<label for="loop_interval">Request Interval (in minutes)</label>
<input type="text" id="loop_interval" size="3" maxlength="3">
<p class="text-info">Minimum 1 minute. Only whole numbers are allowed.</p>
</div>
<div class="form-group">
<label for="loop_uri">Cookie blocking options</label>
<textarea rows="3" id="cookie_ignore"></textarea>
<p class="text-info">Http Cookies received by background request may interfere with the
foreground requests.
<br>Enter names of http cookies you want to ignore in background requests one per
line<br>
Leave blank if you don't need this option</p>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="fg_rule">Foreground Page Reload Rule (Experimental feature)</div>
<div class="panel-body">
<p>Some websites put session idle time in the browser.
<br>For such sites simple re-requesting url in background may not be enough.
<br>Using this option a small javascript will be injected into every matching url, causing
the page to auto-reload if idling more than set number of minutes.
<br>For example settings this option to reload every 2 minutes will defeat site's own idle
timer
if their own times is set to log you out after 3 minutes of idling.</p>
<div class="form-group">
<label for="fg_trigger_uri">Auto-Reload Url. Match any url that start with this
string</label>
<input type="text" class="form-control" id="fg_trigger_uri"
placeholder="Any request that starts with this uri will be auto-reloading">
<p class="text-info">Any url that starts with this url will be set to auto-refresh in set
number of minutes
<br>For example if you set this to "https://mybankportal.com/account/"
<br>Then requests to https://mybankportal.com/account/details and
https://mybankportal.com/account/whatever
<br>will be set to auto-reload
</p>
</div>
<div class="request_interval">
<label for="fg_interval">Reload matching page after this many minutes of idling</label>
<input type="text" class="form-control" style="width: 4em" id="fg_interval" size="3"
maxlength="3">
<p class="text-info">Minimum 1 minute. Only whole numbers are allowed.</p>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="reload_sound"> Play short beep 10 seconds before reloading page.
</label>
<button type="button" class="btn btn-info btn-sm" id="sound_test">Sound test</button>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Loop Exit Options</div>
<div class="panel-body">
<div class="checkbox">
<label>
<input type="checkbox" id="loop_exit_tab"> End Loop when browser tab is closed
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="loop_exit_200"> End Loop when http response code is not 200
</label>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Extra Header</div>
<div class="panel-body">
<p>You may define an extra http header to be sent with background requests
<br>This may be useful if you sending background requests to your own server
<br>and want the "let the server know" that these are special type of requets
<br>Ignore this option if you not using this extension to communicate with your own server
</p>
<div class="row">
<div class="col-md-6">
<input type="text" class="form-control" id="h_name"
placeholder='Name of extra header.'>
<p class="text-info">Extra Header Name</p>
</div>
<div class="col-md-6">
<input type="text" class="form-control" id="h_val"
placeholder='Value of extra header'>
<p class="text-info">Extra Header Value</p>
</div>
</div>
<p class="text-info">You may even override standard headers with this option. For example may
define your own User-Agent header</p>
</div>
</div>
<p>
<button type="button" id="save_rule">Save Rule</button>
<button type="button" data-toggle="modal" data-target="#myModal" id="delete_rule">Delete Rule
</button>
</p>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default" id="power_option">
<div class="panel-heading">System Settings</div>
<div class="panel-body">
<div class="checkbox">
<label>
<input type="checkbox" id="power_saver"> Disable power saving mode
</label>
<p class="text-info">Prevent this computer from going into hibernation when there are scheduled background or foreground page reloads.
</p>
<p class="text-info">The background color of the counter in the extension's browser badge
will be blue when power savings mode is disabled.
</p>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">We need your help!</div>
<div class="panel-body">
<div class="list-group" id="hello_panel">
<p>This extension is FREE.<br>It's Open Source.<br>We never insert ads in your browser!</p>
<p>Please rate it five starts on Chrome store!</p>
<a id="rate_us" href=""
class="btn btn-primary btn-lg" target="_new"><span class="glyphicon glyphicon-thumbs-up"></span> Rate
Us!</a>
<br><br>
<p>Spread the word on Twitter</p>
<a id="twtr" href="https://twitter.com/share" class="twitter-share-button"
data-url=""
data-counturl=""
data-text="Check our this Chrome Extension. Never get logged out of sites due to idling again!"
data-via="snytkine"
data-size="large">Tweet</a>
<br><br>
<p>Like Us On Facebook</p>
<iframe id="my_fb_if"
src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Fstaying-alive%2Flhobbakbeomfcgjallalccfhfcgleinm&width=450&height=35&colorscheme=light&layout=standard&action=like&show_faces=false&send=false&appId=203208779690064"
scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;"
allowTransparency="true"></iframe>
</div>
</div>
</div>
</div>
</div>
<div class="footer"><p class="text-center">This Chrome™ Extension is an Open Source project. <a
href="https://github.com/snytkine/staying_alive" target="mygithub">Source Code</a> hosted on github. ©
Dmitri Snytkine <span id="c_year">2013</span></p>
</div>
</div>
<div id="saved_confirm" style="display: none;">Rule Saved</div>
<!-- Confirmation Modal -->
<div class="modal" id="myModal" tabindex="-1" data-backdrop="" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Confirmation required</h4>
</div>
<div class="modal-body">
Are you sure you want to delete the rule? Click OK to confirm.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="confirm_delete">Ok</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
<!-- Alert Modal -->
<div class="modal" id="alertModal" tabindex="-1" data-backdrop="" role="alert" aria-labelledby="alertModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="alert_title">Validation Error</h4>
</div>
<div class="modal-body" id="alert_message">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>
</body>
</html>