suck [0-9;=A-Z]
This commit is contained in:
parent
16b6931afe
commit
e45948b5cb
@ -369,10 +369,13 @@ iframeLoad = ->
|
|||||||
recaptchaReload()
|
recaptchaReload()
|
||||||
|
|
||||||
keyboardNav = (e) ->
|
keyboardNav = (e) ->
|
||||||
char = String.fromCharCode e.keyCode
|
kc = e.keyCode
|
||||||
unless char in '1234567890GHJKLMOT'
|
#https://developer.mozilla.org/en/DOM/Event/UIEvent/KeyEvent
|
||||||
|
# [0-9;=A-Z]
|
||||||
|
unless 48 <= kc <= 90
|
||||||
return
|
return
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
char = String.fromCharCode kc
|
||||||
hash = location.hash
|
hash = location.hash
|
||||||
if not hash or hash == '#navtop'
|
if not hash or hash == '#navtop'
|
||||||
position = 0
|
position = 0
|
||||||
|
|||||||
@ -456,12 +456,13 @@
|
|||||||
return recaptchaReload();
|
return recaptchaReload();
|
||||||
};
|
};
|
||||||
keyboardNav = function(e) {
|
keyboardNav = function(e) {
|
||||||
var _i, _len, char, count, hash, href, img, position, qrLink, temp;
|
var _i, _len, char, count, hash, href, img, kc, position, qrLink, temp;
|
||||||
char = String.fromCharCode(e.keyCode);
|
kc = e.keyCode;
|
||||||
if (!((function(){ for (var _i=0, _len='1234567890GHJKLMOT'.length; _i<_len; _i++) { if ('1234567890GHJKLMOT'[_i] === char) return true; } return false; }).call(this))) {
|
if (!((48 <= kc) && (kc <= 90))) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
char = String.fromCharCode(kc);
|
||||||
hash = location.hash;
|
hash = location.hash;
|
||||||
if (!hash || hash === '#navtop') {
|
if (!hash || hash === '#navtop') {
|
||||||
position = 0;
|
position = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user