您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Keep Google region set to US and language to English persistently
// ==UserScript== // @name Google US Region Setter and License Acceptor with Persistent US Setting // @namespace http://tampermonkey.net/ // @version 1.9 // @description Keep Google region set to US and language to English persistently // @author Shadow_Kurgansk // @match https://www.google.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Function to persistently set Google region to US and language to English function setGoogleRegionToUS() { const url = new URL(window.location.href); const params = url.searchParams; // Check if the language is already set to English and the region to US if (params.get('hl') !== 'en' || params.get('gl') !== 'us') { params.set('hl', 'en'); // Set language to English params.set('gl', 'us'); // Set region to US // If the URL has changed, reload the page with the new parameters if (window.location.href !== url.href) { window.location.href = url.href; } } } // Function to accept the license agreement with a delay function acceptLicenseAgreement() { // Wait for 200 milliseconds (0.2 seconds) before trying to click the button setTimeout(function() { const acceptButton = document.querySelector('#L2AGLb.tHlp8d'); if (acceptButton) { acceptButton.click(); } }, 200); // Adjust the time as needed } // Execute the acceptLicenseAgreement function when the page includes 'google.com' if (window.location.href.includes('google.com')) { acceptLicenseAgreement(); } // Set an interval to check the region and language every 3 seconds setInterval(setGoogleRegionToUS, 500); })();