Remove accesskeys, we can't prevent them otherwise.
This commit is contained in:
parent
1a0e537d79
commit
beede2108c
@ -692,7 +692,12 @@
|
|||||||
};
|
};
|
||||||
keybinds = {
|
keybinds = {
|
||||||
init: function() {
|
init: function() {
|
||||||
var key;
|
var key, node, _i, _len, _ref;
|
||||||
|
_ref = $$('[accesskey]');
|
||||||
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
|
node = _ref[_i];
|
||||||
|
node.removeAttribute('accesskey');
|
||||||
|
}
|
||||||
keybinds.close = (key = $.getValue('key/close', 0)).length ? key : 'Esc';
|
keybinds.close = (key = $.getValue('key/close', 0)).length ? key : 'Esc';
|
||||||
keybinds.spoiler = (key = $.getValue('key/spoiler', 0)).length ? key : 'ctrl+s';
|
keybinds.spoiler = (key = $.getValue('key/spoiler', 0)).length ? key : 'ctrl+s';
|
||||||
keybinds.zero = (key = $.getValue('key/zero', 0)).length ? key : '0';
|
keybinds.zero = (key = $.getValue('key/zero', 0)).length ? key : '0';
|
||||||
@ -1087,7 +1092,6 @@
|
|||||||
keybind: function(e) {
|
keybind: function(e) {
|
||||||
var kc, key;
|
var kc, key;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
|
||||||
kc = e.keyCode;
|
kc = e.keyCode;
|
||||||
if ((65 <= kc && kc <= 90)) {
|
if ((65 <= kc && kc <= 90)) {
|
||||||
key = String.fromCharCode(kc);
|
key = String.fromCharCode(kc);
|
||||||
|
|||||||
@ -489,6 +489,9 @@ replyHiding =
|
|||||||
|
|
||||||
keybinds =
|
keybinds =
|
||||||
init: ->
|
init: ->
|
||||||
|
for node in $$ '[accesskey]'
|
||||||
|
node.removeAttribute 'accesskey'
|
||||||
|
|
||||||
keybinds.close = if (key = $.getValue 'key/close', 0).length then key else 'Esc'
|
keybinds.close = if (key = $.getValue 'key/close', 0).length then key else 'Esc'
|
||||||
keybinds.spoiler = if (key = $.getValue 'key/spoiler', 0).length then key else 'ctrl+s'
|
keybinds.spoiler = if (key = $.getValue 'key/spoiler', 0).length then key else 'ctrl+s'
|
||||||
keybinds.zero = if (key = $.getValue 'key/zero', 0).length then key else '0'
|
keybinds.zero = if (key = $.getValue 'key/zero', 0).length then key else '0'
|
||||||
@ -866,7 +869,6 @@ options =
|
|||||||
g.hiddenReplies = {}
|
g.hiddenReplies = {}
|
||||||
keybind: (e) ->
|
keybind: (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.stopPropagation()
|
|
||||||
kc = e.keyCode
|
kc = e.keyCode
|
||||||
if 65 <= kc <= 90 #A-Z
|
if 65 <= kc <= 90 #A-Z
|
||||||
key = String.fromCharCode kc
|
key = String.fromCharCode kc
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user