forked from web-scrobbler/web-scrobbler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.js
23 lines (17 loc) · 773 Bytes
/
options.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// options ---------------------------------------------------------------------
$(function(){
// use immediate-change checkboxes
$('#use-notifications').click(function(){
localStorage['useNotifications'] = this.checked ? 1 : 0;
});
$('#use-autocorrect').click(function(){
localStorage['useAutocorrect'] = this.checked ? 1 : 0;
});
$('#use-youtube-inpage').click(function(){
localStorage['useYTInpage'] = this.checked ? 1 : 0;
});
// preload options
$('#use-notifications').attr('checked', (localStorage['useNotifications'] == 1));
$('#use-autocorrect').attr('checked', (localStorage['useAutocorrect'] == 1));
$('#use-youtube-inpage').attr('checked', (localStorage['useYTInpage'] == 1));
});