Press (F2) to Translate.
当前为
// ==UserScript==
// @version 4.0.2.7
// @name Translator
// @name:de Übersetzer
// @description Press (F2) to Translate.
// @description:de Drücken Sie (F2) zum übersetzen.
// @author wack.3gp
// @copyright 2019+ , wack.3gp (https://greasyfork.org/users/4792)
// @namespace https://greasyfork.org/users/4792
// @icon https://translate.google.com/favicon.ico
// @supportURL https://greasyfork.org/scripts/4610/feedback
// @license CC BY-NC-ND 4.0; http://creativecommons.org/licenses/by-nc-nd/4.0/
// @noframes
// @compatible Chrome tested with Tampermonkey
// @grant GM_notification
// @include *://*
// @exclude /^http\w?:\/\/greasyfork\.org\/\w.*?\/4610.*$
// ==/UserScript==
if (GM_info.script.copyright.includes(GM_info.script.namespace)) {
// nothing
}
else {
location.href = GM_info.script.supportURL.replace("feedback", "");
alert("Please install the Orginal Version");
}
// ===============
// ==Key==
document.onkeydown = openPage;
function openPage(F2) {
F2 = window.event ? event : F2;
if (F2.keyCode == 113) {
location.href = "http://translate.google.com/translate?sl=auto&u=" + window.location;
GM_notification({
title: GM_info.script.name,
text: "Post a review, comment, or question",
onclick: function () {
location.href = GM_info.script.supportURL;
},
});
}
}
if (window.location.host.includes('translate.google')) {
console.log("Post a review, comment, or question\n" + GM_info.script.supportURL + "\n\nCopyright " + GM_info.script.copyright);
}
// ==============