您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
A simple script to remove the "?referrer=raid" from the URL after raiding to another streamer
当前为
// ==UserScript== // @name Twitch Raid Referral Remover // @name:de Twitch Raid Referral Entferner // @description A simple script to remove the "?referrer=raid" from the URL after raiding to another streamer // @description:de Ein einfaches Userscript, um nach einem Raid von der URL den Tag `?referrer=raid` zu entfernen. // @author Tirre_G // @homepage https://greasyfork.org/en/scripts/436857-twitch-raid-referral-remover // @namespace https://greasyfork.org/en/users/53355 // @version 0.2.0 // @license The Unlicense // @icon https://www.google.com/s2/favicons?domain=twitch.tv // @match *://*.twitch.tv/*?referrer=raid // @match *://*.twitch.tv/* // @grant none // @run-at document-start // ==/UserScript== (() => { 'use strict'; // Listen for changes in the URL window.onpopstate = function(event) { // Get the current URL let currentURL = window.location.href; // Check if the new URL contains the raid referral tag if (currentURL.match(/\?referrer=raid/gi)) { // Use the URL class to parse the current URL let url = new URL(currentURL); // Remove the "referrer" query parameter url.searchParams.delete('referrer'); setTimeout(function() { // Update the URL in the browser location.href = url.toString(); }, 0); } }; })();