您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes the ?tl= parameter from Reddit search result links on Google
// ==UserScript== // @name Remove ?tl= from Reddit links on Google // @namespace https://github.com/Mythos // @version 1.1 // @description Removes the ?tl= parameter from Reddit search result links on Google // @author Mythos // @license MIT // @match https://www.google.com/search* // @match https://www.google.*/* // @grant none // @run-at document-end // @homepageURL https://github.com/Mythos/userscripts // @supportURL https://github.com/Mythos/userscripts/issues // ==/UserScript== (function () { 'use strict'; const parameterName = 'tl'; function cleanLinks() { document.querySelectorAll('a[href*="reddit.com"]').forEach(a => { try { let url = new URL(a.href); if (url.searchParams.has(parameterName)) { url.searchParams.delete(parameterName); a.href = url.toString(); } } catch (e) { } }); } cleanLinks(); // Observe dynamically loaded search results const observer = new MutationObserver(cleanLinks); observer.observe(document.body, { childList: true, subtree: true }); })();