您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Let sunshine take over Huasing!
// ==UserScript== // @name Hide ill posts // @namespace http://tampermonkey.net/ // @version 0.7 // @description Let sunshine take over Huasing! // @author Nevermoi // @match http://bbs.huasing.*/sForum/*.php* // @grant none // ==/UserScript== (function() { 'use strict'; var banList = ['HitmanYK']; for(var i = 0; i < banList.length; i++) { killThemAll(banList[i]); killThemAllInPost(banList[i]); } function killThemAll(name) { var them = $("div.ccol6 a[title="+ name +"]"); var targets = []; for(var i = 0; i < them.length; i++) { var parents = $(them[i]).parents(); //by inspecting dom, the 3rd element is div.brow2 targets.push(parents[2]); } for(var j = 0; j < targets.length; j++) { $(targets[j]).hide(); } } function killThemAllInPost(name) { var themTitles = $("div.authordiv:contains('" + name + "')"); for (var i = 0; i < themTitles.length; i++) { // hide title by name $(themTitles[i]).hide(); // get content id var contentId = "#" + themTitles[i].id.replace('auth', 'content'); // hide content by id $(contentId).hide(); } } })();