您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically clicks the "Change to English" link when it appears on Google.
// ==UserScript== // @name Auto Click "Change to English" on Google // @description Automatically clicks the "Change to English" link when it appears on Google. // @match *://www.google.com/* // @run-at document-idle // @version 0.0.1.20250506075555 // @namespace https://greasyfork.org/users/1435046 // ==/UserScript== (function() { 'use strict'; function clickChangeToEnglish() { const candidates = document.querySelectorAll('a[href*="/setprefs"]'); const link = Array.from(candidates).find( a => a.textContent.trim() === "Change to English" ); if (link) { link.click(); observer.disconnect(); // no need to keep observing once we've clicked } } // Try once immediately clickChangeToEnglish(); // Observe DOM for dynamically‑inserted links const observer = new MutationObserver(clickChangeToEnglish); observer.observe(document.body, { childList: true, subtree: true }); })();