zuanke8.com topics blocking tools

zuanke8.com junk blocking

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name zuanke8.com topics blocking tools
// @namespace discuz
// @description:en zuanke8.com junk blocking
// @description:zh 屏蔽赚吧包含特定关键字和用户的主题不予显示,减少水帖干扰。
// @include        http://www.zuanke8.com/*
// @version 0.0.1
// @description zuanke8.com junk blocking
// ==/UserScript==

// 主题列表页
var btopics = new Array("小知", "斐讯", "和包");
for (x in btopics) {
	xtopics = document.evaluate('//table/tbody[tr[1]/th[1]//a[contains(text(),"' + btopics[x] + '")]]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
	if (xtopics.snapshotLength) {
		for (var i = 0, c = ""; i < xtopics.snapshotLength; i++) {
			xtopics.snapshotItem(i).innerHTML = "<tbody style='display:none;'></tbody>";
		}
	}
}

// 屏蔽特定用户的发帖
// 直接填写用户名在引号里面,每组引号用半角逗号隔开。
var abusers = new Array("", "");
for (x in abusers) {
	abuser = document.evaluate('//table/tbody[tr[1]/td[2]//cite/a[text()="' + abusers[x] + '"]]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
	if (abuser.snapshotLength) {
		for (var i = 0, c = ""; i < abuser.snapshotLength; i++) {
			abuser.snapshotItem(i).innerHTML = "<tbody style='display:none;'></tbody>";
		}
	}
}