From fa51b7d7eb6dc10d6e186eef12da5c2cbaaf21cf Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 11 Mar 2013 21:48:09 +0100 Subject: [PATCH] Don't start keybinding before everything is ready. --- 4chan_x.user.js | 2 +- src/features.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 1215d3cee..f6978c9e4 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2822,9 +2822,9 @@ if (g.VIEW === 'catalog' || !Conf['Keybinds']) { return; } - $.on(d, 'keydown', Keybinds.keydown); return $.on(d, '4chanXInitFinished', function() { var node, _i, _len, _ref; + $.on(d, 'keydown', Keybinds.keydown); _ref = $$('[accesskey]'); for (_i = 0, _len = _ref.length; _i < _len; _i++) { node = _ref[_i]; diff --git a/src/features.coffee b/src/features.coffee index 60bf0e651..5b181b1ce 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -1550,8 +1550,8 @@ Keybinds = init: -> return if g.VIEW is 'catalog' or !Conf['Keybinds'] - $.on d, 'keydown', Keybinds.keydown $.on d, '4chanXInitFinished', -> + $.on d, 'keydown', Keybinds.keydown for node in $$ '[accesskey]' node.removeAttribute 'accesskey' return