diff --git a/4chan_x.user.js b/4chan_x.user.js index 9bffa369c..84109f3c2 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -730,12 +730,9 @@ if (((_ref = e.target.nodeName) === 'TEXTAREA' || _ref === 'INPUT') && !e.altKey && !e.ctrlKey && !(e.keyCode === 27)) { return; } - if (!(key = keybinds.cb.keyCode(e))) { + if ((key = keybinds.cb.keyCode(e)) == null) { return; } - if (key === 'BS') { - key = ''; - } thread = nav.getThread(); switch (key) { case conf.close: diff --git a/script.coffee b/script.coffee index 5e6353289..1c2f91f81 100644 --- a/script.coffee +++ b/script.coffee @@ -520,8 +520,7 @@ keybinds = cb: keydown: (e) -> return if e.target.nodeName in ['TEXTAREA', 'INPUT'] and not e.altKey and not e.ctrlKey and not (e.keyCode is 27) - return unless key = keybinds.cb.keyCode e - if key is 'BS' then key = '' + return unless (key = keybinds.cb.keyCode e)? thread = nav.getThread() switch key