您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes any element containing "suyu" in the element...
// ==UserScript== // @name Fuck Suyu Posts // @namespace http://tampermonkey.net/ // @version 2024-03-21 // @description Removes any element containing "suyu" in the element... // @author Oroborius // @match *.reddit.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com // @license MIT // @grant none // ==/UserScript== (function() { 'use strict'; // Select the node that will be observed for mutations const targetNode = document.getElementsByClassName("rpBJOHq2PR60pnwJlUyP0")[0]; // Options for the observer (which mutations to observe) const config = { attributes: true, childList: true, subtree: true }; // Callback function to execute when mutations are observed const callback = (mutationList, observer) => { for (const mutation of mutationList) { [...document.querySelectorAll("a")] .filter(a => a.textContent.toLowerCase().includes("suyu")) .forEach(a => a.parentElement.parentElement.remove()); } }; // Create an observer instance linked to the callback function const observer = new MutationObserver(callback); // Start observing the target node for configured mutations observer.observe(targetNode, config); })();