您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This script will replace all "case-battle/1234567" text messages to clickable links.
当前为
// ==UserScript== // @name Cases.GG - Text to Link // @description This script will replace all "case-battle/1234567" text messages to clickable links. // @match https://cases.gg/* // @grant none // @license WTFPL // @version 0.0.1.20250112001300 // @namespace https://greasyfork.org/users/1422210 // ==/UserScript== (function() { 'use strict'; setInterval(function() { var textSpans = document.querySelectorAll('span'); for (var i = 0; i < textSpans.length; i++) { var span = textSpans[i]; var text = span.textContent; if (text.includes("case-battles")) { var regex = /(case-battles\/[^\s]+)/gi; var newText = text.replace(regex, '<a href="https:\/\/cases\.gg\/$&" target="_blank" style="color: #22c55e;">$&</a>'); span.innerHTML = newText; } } }, 500); })();