diff --git a/4chan_x.coffee b/4chan_x.coffee index 8cf277f48..7ceb46af1 100644 --- a/4chan_x.coffee +++ b/4chan_x.coffee @@ -370,7 +370,7 @@ iframeLoad = -> keyboardNav = (e) -> char = String.fromCharCode e.keyCode - unless char in '1234567890GHJKLOT' + unless char in '1234567890GHJKLMOT' return e.preventDefault() hash = location.hash @@ -413,6 +413,9 @@ keyboardNav = (e) -> temp = g.PAGENUM + count if temp > 15 then temp = 15 location.pathname = "/#{g.BOARD}/#{temp}#1" + when "M" + img = $("#{hash} ~ img") + watch.call img when "O" qrLink = $ "#{hash} ~ span[id] a:not(:first-child)" quickReply.call qrLink diff --git a/4chan_x.js b/4chan_x.js index 00ad3e237..83dfe3728 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -456,9 +456,9 @@ return recaptchaReload(); }; keyboardNav = function(e) { - var _i, _len, char, count, hash, href, position, qrLink, temp; + var _i, _len, char, count, hash, href, img, position, qrLink, temp; char = String.fromCharCode(e.keyCode); - if (!((function(){ for (var _i=0, _len='1234567890GHJKLOT'.length; _i<_len; _i++) { if ('1234567890GHJKLOT'[_i] === char) return true; } return false; }).call(this))) { + if (!((function(){ for (var _i=0, _len='1234567890GHJKLMOT'.length; _i<_len; _i++) { if ('1234567890GHJKLMOT'[_i] === char) return true; } return false; }).call(this))) { return null; } e.preventDefault(); @@ -522,6 +522,10 @@ } location.pathname = ("/" + (g.BOARD) + "/" + (temp) + "#1"); break; + case "M": + img = $("" + (hash) + " ~ img"); + watch.call(img); + break; case "O": qrLink = $("" + (hash) + " ~ span[id] a:not(:first-child)"); quickReply.call(qrLink);