Created
March 2, 2012 16:16
-
-
Save taizooo/1959402 to your computer and use it in GitHub Desktop.
reblog machine で "o" キーで tumblelog を、"r"キーで reblog ページを開く
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name reblogMachineOpenDoor.user.js | |
// @namespace http://taizooo.tumblr.com/ | |
// @include http://reblog.machine.mamemomonga.com/dashboard* | |
// ==/UserScript== | |
location.href = 'javascript:(' + | |
function () { | |
(function (w) { | |
$(w).keypress(function (b) { | |
if (!b.ctrlKey && (b.which == 32 || 65 <= b.which && b.which <= 90 || 97 <= b.which && b.which <= 122)) { | |
var b = String.fromCharCode(b.which); | |
if (b == 'o') { | |
w.open($('a#avatar_tumblelog')[0].href); | |
} else if (b == 'r') { | |
w.open($('a#btns_pfunc_t_reblog')[0].href); | |
} | |
} | |
}); | |
})(window) | |
}.toString() + ')()'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment