Translator

Press (F2) to Translate.

目前為 2019-10-20 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        Translator
// @name:de     Übersetzer
// @namespace   wack.3gp
// @description Press (F2) to Translate.
// @description:de Drücken Sie (F2) zum übersetzen.
// @include     *://*
// @version     4.0.1.0
// @author  wack.3gp
// @copyright   2019+ , wack.3gp
// @grant unsafeWindow
// @grant GM_xmlhttpRequest
// @grant GM_notification
// @supportURL https://greasyfork.org/scripts/4610/feedback
// @license Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License; http://creativecommons.org/licenses/by-nc-nd/3.0/
// ==/UserScript==

// ==VAR==
var jslink = "javascript";
// ==============

// ==Function==
    unsafeWindow.translate = function(){
        window.location="http://translate.google.com/translate?sl=auto&u="+window.location;
        };
// ==============

// ==Key==
document.onkeydown= openPage ;
function openPage(e) {
e= window.event ? event : e;
    if (e.keyCode == 113 ) {location.href=jslink+":translate()";}
}
// ==============