Only save settings on change, not when opening the options.
This commit is contained in:
parent
898b2b0f19
commit
f7af32247f
@ -1370,7 +1370,9 @@
|
|||||||
(back = $('[name=backlink]', dialog)).value = conf['backlink'];
|
(back = $('[name=backlink]', dialog)).value = conf['backlink'];
|
||||||
(time = $('[name=time]', dialog)).value = conf['time'];
|
(time = $('[name=time]', dialog)).value = conf['time'];
|
||||||
$.on(back, 'keyup', options.backlink);
|
$.on(back, 'keyup', options.backlink);
|
||||||
|
$.on(back, 'keyup', $.cb.value);
|
||||||
$.on(time, 'keyup', options.time);
|
$.on(time, 'keyup', options.time);
|
||||||
|
$.on(time, 'keyup', $.cb.value);
|
||||||
favicon = $('select', dialog);
|
favicon = $('select', dialog);
|
||||||
_ref3 = favicon.options;
|
_ref3 = favicon.options;
|
||||||
for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) {
|
for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) {
|
||||||
@ -1381,6 +1383,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$.on(favicon, 'change', options.favicon);
|
$.on(favicon, 'change', options.favicon);
|
||||||
|
$.on(favicon, 'change', $.cb.value);
|
||||||
_ref4 = $$('#keybinds_tab + div input', dialog);
|
_ref4 = $$('#keybinds_tab + div input', dialog);
|
||||||
for (_k = 0, _len3 = _ref4.length; _k < _len3; _k++) {
|
for (_k = 0, _len3 = _ref4.length; _k < _len3; _k++) {
|
||||||
input = _ref4[_k];
|
input = _ref4[_k];
|
||||||
@ -1428,17 +1431,14 @@
|
|||||||
return $.cb.value.call(this);
|
return $.cb.value.call(this);
|
||||||
},
|
},
|
||||||
time: function() {
|
time: function() {
|
||||||
$.cb.value.call(this);
|
|
||||||
Time.foo();
|
Time.foo();
|
||||||
Time.date = new Date();
|
Time.date = new Date();
|
||||||
return $('#timePreview').textContent = Time.funk(Time);
|
return $('#timePreview').textContent = Time.funk(Time);
|
||||||
},
|
},
|
||||||
backlink: function() {
|
backlink: function() {
|
||||||
$.cb.value.call(this);
|
|
||||||
return $('#backlinkPreview').textContent = conf['backlink'].replace(/%id/, '123456789');
|
return $('#backlinkPreview').textContent = conf['backlink'].replace(/%id/, '123456789');
|
||||||
},
|
},
|
||||||
favicon: function() {
|
favicon: function() {
|
||||||
$.cb.value.call(this);
|
|
||||||
Favicon["switch"]();
|
Favicon["switch"]();
|
||||||
if (g.REPLY && conf['Unread Count']) Favicon.update();
|
if (g.REPLY && conf['Unread Count']) Favicon.update();
|
||||||
return this.nextElementSibling.innerHTML = "<img src=" + Favicon.unreadSFW + "> <img src=" + Favicon.unreadNSFW + "> <img src=" + Favicon.unreadDead + ">";
|
return this.nextElementSibling.innerHTML = "<img src=" + Favicon.unreadSFW + "> <img src=" + Favicon.unreadNSFW + "> <img src=" + Favicon.unreadDead + ">";
|
||||||
|
|||||||
@ -1020,13 +1020,16 @@ options =
|
|||||||
(back = $ '[name=backlink]', dialog).value = conf['backlink']
|
(back = $ '[name=backlink]', dialog).value = conf['backlink']
|
||||||
(time = $ '[name=time]', dialog).value = conf['time']
|
(time = $ '[name=time]', dialog).value = conf['time']
|
||||||
$.on back, 'keyup', options.backlink
|
$.on back, 'keyup', options.backlink
|
||||||
|
$.on back, 'keyup', $.cb.value
|
||||||
$.on time, 'keyup', options.time
|
$.on time, 'keyup', options.time
|
||||||
|
$.on time, 'keyup', $.cb.value
|
||||||
favicon = $ 'select', dialog
|
favicon = $ 'select', dialog
|
||||||
for option in favicon.options
|
for option in favicon.options
|
||||||
if option.textContent is conf['favicon']
|
if option.textContent is conf['favicon']
|
||||||
option.selected = true
|
option.selected = true
|
||||||
break
|
break
|
||||||
$.on favicon, 'change', options.favicon
|
$.on favicon, 'change', options.favicon
|
||||||
|
$.on favicon, 'change', $.cb.value
|
||||||
|
|
||||||
#keybinds
|
#keybinds
|
||||||
for input in $$ '#keybinds_tab + div input', dialog
|
for input in $$ '#keybinds_tab + div input', dialog
|
||||||
@ -1045,7 +1048,7 @@ options =
|
|||||||
|
|
||||||
overlay = $.el 'div', id: 'overlay'
|
overlay = $.el 'div', id: 'overlay'
|
||||||
$.on overlay, 'click', -> $.rm overlay
|
$.on overlay, 'click', -> $.rm overlay
|
||||||
$.on dialog, 'click', (e) -> e.stopPropagation()
|
$.on dialog, 'click', (e) -> e.stopPropagation()
|
||||||
$.add overlay, dialog
|
$.add overlay, dialog
|
||||||
$.add d.body, overlay
|
$.add d.body, overlay
|
||||||
|
|
||||||
@ -1067,15 +1070,12 @@ options =
|
|||||||
@value = key
|
@value = key
|
||||||
$.cb.value.call @
|
$.cb.value.call @
|
||||||
time: ->
|
time: ->
|
||||||
$.cb.value.call @
|
|
||||||
Time.foo()
|
Time.foo()
|
||||||
Time.date = new Date()
|
Time.date = new Date()
|
||||||
$('#timePreview').textContent = Time.funk Time
|
$('#timePreview').textContent = Time.funk Time
|
||||||
backlink: ->
|
backlink: ->
|
||||||
$.cb.value.call @
|
|
||||||
$('#backlinkPreview').textContent = conf['backlink'].replace /%id/, '123456789'
|
$('#backlinkPreview').textContent = conf['backlink'].replace /%id/, '123456789'
|
||||||
favicon: ->
|
favicon: ->
|
||||||
$.cb.value.call @
|
|
||||||
Favicon.switch()
|
Favicon.switch()
|
||||||
Favicon.update() if g.REPLY and conf['Unread Count']
|
Favicon.update() if g.REPLY and conf['Unread Count']
|
||||||
@nextElementSibling.innerHTML = "<img src=#{Favicon.unreadSFW}> <img src=#{Favicon.unreadNSFW}> <img src=#{Favicon.unreadDead}>"
|
@nextElementSibling.innerHTML = "<img src=#{Favicon.unreadSFW}> <img src=#{Favicon.unreadNSFW}> <img src=#{Favicon.unreadDead}>"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user