keyboard navigation - o for open
This commit is contained in:
parent
eea05abfa6
commit
5be92870f6
@ -361,7 +361,7 @@ iframeLoad = ->
|
||||
|
||||
keyboardNav = (e) ->
|
||||
char = String.fromCharCode e.keyCode
|
||||
unless char in '1234567890GHJKL'
|
||||
unless char in '1234567890GHJKLO'
|
||||
return
|
||||
e.preventDefault()
|
||||
hash = location.hash
|
||||
@ -404,6 +404,9 @@ keyboardNav = (e) ->
|
||||
temp = g.PAGENUM + count
|
||||
if temp > 15 then temp = 15
|
||||
location.pathname = "/#{g.BOARD}/#{temp}#1"
|
||||
when "O"
|
||||
qrLink = $ "#{hash} ~ span[id] a:not(:first-child)"
|
||||
quickReply.call qrLink
|
||||
g.count = 0
|
||||
|
||||
nodeInserted = (e) ->
|
||||
|
||||
@ -445,9 +445,9 @@
|
||||
return recaptchaReload();
|
||||
};
|
||||
keyboardNav = function(e) {
|
||||
var _i, _len, char, count, hash, position, temp;
|
||||
var _i, _len, char, count, hash, position, qrLink, temp;
|
||||
char = String.fromCharCode(e.keyCode);
|
||||
if (!((function(){ for (var _i=0, _len='1234567890GHJKL'.length; _i<_len; _i++) { if ('1234567890GHJKL'[_i] === char) return true; } return false; }).call(this))) {
|
||||
if (!((function(){ for (var _i=0, _len='1234567890GHJKLO'.length; _i<_len; _i++) { if ('1234567890GHJKLO'[_i] === char) return true; } return false; }).call(this))) {
|
||||
return null;
|
||||
}
|
||||
e.preventDefault();
|
||||
@ -511,6 +511,10 @@
|
||||
}
|
||||
location.pathname = ("/" + (g.BOARD) + "/" + (temp) + "#1");
|
||||
break;
|
||||
case "O":
|
||||
qrLink = $("" + (hash) + " ~ span[id] a:not(:first-child)");
|
||||
quickReply.call(qrLink);
|
||||
break;
|
||||
}
|
||||
return (g.count = 0);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user