您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Enables Alt + Z to copy translated text and Ctrl + Shift + S to swap languages for Google Translate, DeepL, and Bing Translate
当前为
// ==UserScript== // @name Google, DeepL, And Bing Translate Swap Languages And Copy Translation Hotkeys // @author NWP // @description Enables Alt + Z to copy translated text and Ctrl + Shift + S to swap languages for Google Translate, DeepL, and Bing Translate // @namespace https://gf.qytechs.cn/users/877912 // @version 0.1 // @license MIT // @match https://translate.google.com/* // @match https://www.deepl.com/*/translator* // @match https://www.bing.com/translator* // @grant none // ==/UserScript== (function() { 'use strict'; function clickElement(element) { if (element) { element.click(); } } function handleKeydown(event) { // Alt + Z for copying translated text if (event.altKey && event.key === 'z') { const googleCopyButton = document.querySelector('button[data-tooltip-id="ucc-11"]'); clickElement(googleCopyButton); const deepLCopyButton = document.querySelector('button[data-testid="translator-target-toolbar-copy"]'); clickElement(deepLCopyButton); const bingCopyButton = document.querySelector('div#tta_copyIcon'); clickElement(bingCopyButton); } // Ctrl + Shift + S for swapping languages if (event.ctrlKey && event.shiftKey && event.key === 'S') { const deepLSwapButton = document.querySelector('button[data-testid="lmt_language_switch"]'); clickElement(deepLSwapButton); const bingSwapButton = document.querySelector('div#tta_revIcon'); clickElement(bingSwapButton); } } document.addEventListener('keydown', handleKeydown, false); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址