您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Optimize Nodeseek Links.
当前为
// ==UserScript== // @name NodeSeekLinkOptimizer // @license AGPL-3.0 // @namespace http://www.nodeseek.com/ // @version 2025-05-20 // @description Optimize Nodeseek Links. // @author xykt // @match https://www.nodeseek.com/* // @match https://nodeseek.com/* // @icon https://www.nodeseek.com/static/image/favicon/android-chrome-192x192.png // ==/UserScript== (function() { 'use strict'; const PARAMS_TO_REMOVE = ['ref', 'aff', 'rc', 'affid', 'u', 'nci', 'aff_code', 'affiliate']; const ROOT_PARAMS_TO_REMOVE = ['code', 'kwd']; const links = document.getElementsByTagName('a'); for (let i = 0; i < links.length; i++) { const link = links[i]; let href = link.getAttribute('href'); if (!href) continue; if (href.startsWith('/jump?to=')) { try { const decodedUrl = decodeURIComponent(href.substring('/jump?to='.length)); href = decodedUrl; link.href = decodedUrl; link.title = decodedUrl; } catch (e) { continue; } } try { const url = new URL(href, window.location.origin); const params = url.searchParams; let shouldUpdate = false; let hasTitle = link.title && link.title.trim() !== ''; if (url.hostname.toLowerCase() === 't.me') { for (const [key] of params) { if (key.toLowerCase() === 'start') { params.delete(key); shouldUpdate = true; } } } for (const [key] of params) { const lowerKey = key.toLowerCase(); if (PARAMS_TO_REMOVE.includes(lowerKey)) { params.delete(key); shouldUpdate = true; } } if (url.pathname === '/') { for (const [key] of params) { const lowerKey = key.toLowerCase(); if (ROOT_PARAMS_TO_REMOVE.includes(lowerKey)) { params.delete(key); shouldUpdate = true; } } } if (shouldUpdate) { link.href = url.href; if (hasTitle) { link.title = url.href; } } } catch (e) { continue; } } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址