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