Don't start keybinding before everything is ready.

This commit is contained in:
Nicolas Stepien 2013-03-11 21:48:09 +01:00
parent 7f4070ec37
commit fa51b7d7eb
2 changed files with 2 additions and 2 deletions

View File

@ -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];

View File

@ -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