您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hide chat messages from blocked users in Pardus chat
// ==UserScript== // @name Pardus Shadowban - Chat // @license MIT // @namespace http://tampermonkey.net/ // @version 1 // @description Hide chat messages from blocked users in Pardus chat // @author Solarix // @match https://chat.pardus.at/chattext.php?channel=*&uni=* // @grant none // ==/UserScript== (function() { 'use strict'; const blockedUsers = ['Jinx', 'Hired Gun', 'InsertNameHere']; // Add usernames here function cleanChat() { const lines = document.querySelectorAll('div'); lines.forEach(line => { const senderLink = line.querySelector("a[href^=\"javascript:sendmsg('\"]"); if (senderLink) { const match = senderLink.getAttribute('href').match(/sendmsg\('([^']+)'\)/); if (match && blockedUsers.includes(match[1])) { line.remove(); } } }); } // Run on initial load cleanChat(); // Continuously monitor for new messages const observer = new MutationObserver(cleanChat); observer.observe(document.body, { childList: true, subtree: true }); })();