keybinds.cb -> keybinds
This commit is contained in:
parent
869f554e73
commit
566672afe7
@ -722,15 +722,14 @@
|
||||
node = _ref[_i];
|
||||
node.removeAttribute('accesskey');
|
||||
}
|
||||
return $.bind(d, 'keydown', keybinds.cb.keydown);
|
||||
return $.bind(d, 'keydown', keybinds.keydown);
|
||||
},
|
||||
cb: {
|
||||
keydown: function(e) {
|
||||
var o, range, selEnd, selStart, ta, thread, valEnd, valMid, valStart, value, _ref, _ref2, _ref3;
|
||||
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.keyCode(e))) {
|
||||
return;
|
||||
}
|
||||
thread = nav.getThread();
|
||||
@ -855,7 +854,6 @@
|
||||
}
|
||||
}
|
||||
return key;
|
||||
}
|
||||
},
|
||||
img: function(thread, all) {
|
||||
var root, thumb;
|
||||
@ -1130,7 +1128,7 @@
|
||||
keybind: function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if ((key = keybinds.cb.keyCode(e)) == null) {
|
||||
if ((key = keybinds.keyCode(e)) == null) {
|
||||
return;
|
||||
}
|
||||
this.value = key;
|
||||
|
||||
@ -515,12 +515,11 @@ keybinds =
|
||||
init: ->
|
||||
for node in $$ '[accesskey]'
|
||||
node.removeAttribute 'accesskey'
|
||||
$.bind d, 'keydown', keybinds.cb.keydown
|
||||
$.bind d, 'keydown', keybinds.keydown
|
||||
|
||||
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
|
||||
return unless key = keybinds.keyCode e
|
||||
|
||||
thread = nav.getThread()
|
||||
switch key
|
||||
@ -893,7 +892,7 @@ options =
|
||||
keybind: (e) ->
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
return unless (key = keybinds.cb.keyCode e)?
|
||||
return unless (key = keybinds.keyCode e)?
|
||||
@value = key
|
||||
$.setValue @name, key
|
||||
conf[@name] = key
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user