您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This script displays a menu option in your userscript manager to translate the current page using Google Translate
当前为
// ==UserScript== // @name Google Translate - 2022 // @namespace https://gf.qytechs.cn/users/906463-coffeegrind123 // @homepageURL https://gist.github.com/coffeegrind123/8ca2c7e700aca3341c71da8d612f6130 // @supportURL https://gf.qytechs.cn/scripts/443947-google-translate-2022 // @match http*://*/* // @exclude http*://*.google.*/* // @grant GM_registerMenuCommand // @noframes // @version 1.8 // @license WTFPL // @icon https://translate.google.com/favicon.ico // @author coffeegrind123 // @description This script displays a menu option in your userscript manager to translate the current page using Google Translate // ==/UserScript== (function () { 'use strict'; if (window.top != window.self) return; function translateRedirect() { var arr = window.location.href.split('?'); if (arr.length > 1 && arr[1] !== '') { var translateParams = '&_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en'; } else { var translateParams = '?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en'; } var website = window.location.hostname.replace(/\./g, '-'); var redirect = 'https://' + website + '.translate.goog' + window.location.pathname + window.location.search + translateParams + window.location.hash window.location = redirect; } GM_registerMenuCommand('Translate page', translateRedirect); }());
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址