您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replace bilibili's tracking parameter and makes it funnier.
// ==UserScript== // @name F**k BILIBILI'S TRACKING PARAMETER // @namespace https://ceplavia.com // @version 1.0 // @description Replace bilibili's tracking parameter and makes it funnier. // @author Ceplavia // @match https://www.bilibili.com/video/* // @match https://www.bilibili.com/s/video/* // @match https://acg.tv/* // @match https://b23.tv/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; function checkAndReplaceParams() { let url = new URL(window.location.href); let params = url.searchParams; let isChanged = false; if (params.has('vd_source')) { params.set('vd_source', 'CHEN_RUI_NI_MA_SHEN_ME_SHI_HOU_SI_A'); isChanged = true; } if (params.has('spm_id_from')) { params.set('spm_id_from', 'SHA_BI_CHEN_RUI'); isChanged = true; } if (isChanged) { url.search = params.toString(); window.history.replaceState({}, '', url.toString()); } } let observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.type === 'childList') { checkAndReplaceParams(); } }); }); let config = { childList: true, subtree: true }; observer.observe(document.body, config); checkAndReplaceParams(); })();