diff --git a/4chan_x.user.js b/4chan_x.user.js index 4ce2378fd..7b1f2ae1b 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1370,7 +1370,9 @@ (back = $('[name=backlink]', dialog)).value = conf['backlink']; (time = $('[name=time]', dialog)).value = conf['time']; $.on(back, 'keyup', options.backlink); + $.on(back, 'keyup', $.cb.value); $.on(time, 'keyup', options.time); + $.on(time, 'keyup', $.cb.value); favicon = $('select', dialog); _ref3 = favicon.options; for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) { @@ -1381,6 +1383,7 @@ } } $.on(favicon, 'change', options.favicon); + $.on(favicon, 'change', $.cb.value); _ref4 = $$('#keybinds_tab + div input', dialog); for (_k = 0, _len3 = _ref4.length; _k < _len3; _k++) { input = _ref4[_k]; @@ -1428,17 +1431,14 @@ return $.cb.value.call(this); }, time: function() { - $.cb.value.call(this); Time.foo(); Time.date = new Date(); return $('#timePreview').textContent = Time.funk(Time); }, backlink: function() { - $.cb.value.call(this); return $('#backlinkPreview').textContent = conf['backlink'].replace(/%id/, '123456789'); }, favicon: function() { - $.cb.value.call(this); Favicon["switch"](); if (g.REPLY && conf['Unread Count']) Favicon.update(); return this.nextElementSibling.innerHTML = " "; diff --git a/script.coffee b/script.coffee index 0c2adee42..34846bf18 100644 --- a/script.coffee +++ b/script.coffee @@ -1020,13 +1020,16 @@ options = (back = $ '[name=backlink]', dialog).value = conf['backlink'] (time = $ '[name=time]', dialog).value = conf['time'] $.on back, 'keyup', options.backlink + $.on back, 'keyup', $.cb.value $.on time, 'keyup', options.time + $.on time, 'keyup', $.cb.value favicon = $ 'select', dialog for option in favicon.options if option.textContent is conf['favicon'] option.selected = true break $.on favicon, 'change', options.favicon + $.on favicon, 'change', $.cb.value #keybinds for input in $$ '#keybinds_tab + div input', dialog @@ -1045,7 +1048,7 @@ options = overlay = $.el 'div', id: 'overlay' $.on overlay, 'click', -> $.rm overlay - $.on dialog, 'click', (e) -> e.stopPropagation() + $.on dialog, 'click', (e) -> e.stopPropagation() $.add overlay, dialog $.add d.body, overlay @@ -1067,15 +1070,12 @@ options = @value = key $.cb.value.call @ time: -> - $.cb.value.call @ Time.foo() Time.date = new Date() $('#timePreview').textContent = Time.funk Time backlink: -> - $.cb.value.call @ $('#backlinkPreview').textContent = conf['backlink'].replace /%id/, '123456789' favicon: -> - $.cb.value.call @ Favicon.switch() Favicon.update() if g.REPLY and conf['Unread Count'] @nextElementSibling.innerHTML = " "