您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a "G+R" shortcut to go to review
当前为
// ==UserScript== // @name Go To Review // @namespace http://greasyfork.org // @author Cameron Bernhardt (AstroCB) // @description Adds a "G+R" shortcut to go to review // @version 1.0 // @include *://*.stackexchange.com/* // @include *://*stackoverflow.com/* // @include *://*serverfault.com/* // @include *://*superuser.com/* // @include *://*askubuntu.com/* // @include *://*stackapps.com/* // ==/UserScript== function listenForKeys(e) { if (e.keyCode === 114 && lastKey === 103) { $(".topbar-menu-links")[0].children[0].click(); } lastKey = e.keyCode; } function stopListeningForKeys() { $("body").unbind("keypress", listenForKeys); }; function attachListener() { var lastKey; $("body").keypress(listenForKeys); } var main = function () { attachListener(); $("input").focus(stopListeningForKeys); $("input").blur(attachListener); window.setInterval(function () { // Some text fields are created dynamically $("textarea").focus(stopListeningForKeys).keypress(stopListeningForKeys); $("textarea").blur(attachListener); }, 1000); }; var listen = document.createElement("script"); listen.type = "text/javascript"; listen.textContent = listenForKeys.toString(); document.body.appendChild(listen); var stop = document.createElement("script"); stop.type = "text/javascript"; stop.textContent = stopListeningForKeys.toString(); document.body.appendChild(stop); var attach = document.createElement("script"); attach.type = "text/javascript"; attach.textContent = attachListener.toString(); document.body.appendChild(attach); var script = document.createElement("script"); script.type = "text/javascript"; script.textContent = "(" + main.toString() + ")();"; document.body.appendChild(script);