diff --git a/4chan_x.user.js b/4chan_x.user.js index caa283231..b872381a6 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1134,6 +1134,7 @@ keybind: function(e) { var kc, key; e.preventDefault(); + e.stopPropagation(); kc = e.keyCode; if ((65 <= kc && kc <= 90)) { key = String.fromCharCode(kc); @@ -1157,7 +1158,8 @@ } } this.value = key; - return $.setValue("key/" + this.name, key); + $.setValue("key/" + this.name, key); + return keybinds[this.name] = key; } }, time: function(e) { diff --git a/script.coffee b/script.coffee index 6f2023bce..22d1d2bd3 100644 --- a/script.coffee +++ b/script.coffee @@ -905,6 +905,7 @@ options = g.hiddenReplies = {} keybind: (e) -> e.preventDefault() + e.stopPropagation() kc = e.keyCode if 65 <= kc <= 90 #A-Z key = String.fromCharCode kc @@ -923,6 +924,7 @@ options = key = 'ctrl+' + key if e.ctrlKey @value = key $.setValue "key/#{@name}", key + keybinds[@name] = key time: (e) -> $.setValue 'time', @value Time.foo()