chrome/火狐瀏覽器 discuz論壇用戶ID簡易屏蔽方法 讓你看不到“它”的帖
1.首先把你的chrome瀏覽器裝上油猴Tampermonkey插件,火狐可用scriptish,商店一搜就有,然后參照下法:
①如果你的瀏覽器是chrome,復制下邊黑色字的代碼到寫字板,修改第九行的new Array后的id1,id2,id3為你需要屏蔽的ID(注意不是UID),可添加多個。全選復制。然后打開你需要屏蔽的論壇地址,點擊Tampermonkey。
點擊添加新腳本,把前邊復制好的腳本粘貼進去,保存后啟用.
最后刷新論壇,會發現右上角的標示變為1,說明腳本有啟用,這時候就看不到你要屏蔽的ID的發帖了,眼不見心爽.
有強迫癥的話可以干脆右鍵將腳本插件圖標隱藏掉,這樣可以完美無視掉傻嗶們的帖子了.
②如果你的瀏覽器是火狐Firefox,同樣復制下邊黑色字的代碼到寫字板,修改第九行的new Array后的id1,id2,id3為你需要屏蔽的ID后打開一個記事本復制進去,避免有的時候直接復制到記事本里換行符不被識別,保存,然后將這個記事本.txt后綴改為.user.js,拖進火狐里安裝,刷新后就看不到你要屏蔽的ID的發帖了,眼不見心爽*
- ---------------分割線 以下為腳本1 屏蔽主題用------------------
- // ==UserScript==
- // @name discuz 屏蔽id
- // @namespace
- // @include */viewthread.php*
- // @include */thread*
- // @include */redirect.php*
- // @include */forum*
- // ==/UserScript==
- var bl = new Array("id1","id2","id3");
- for (x in bl) {
- b = document.evaluate('//table/tbody[tr[1]/td[1]//a[text()="' + bl[x] + '"]]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
- if (b.snapshotLength) {
- for (var i = 0,c=""; i < b.snapshotLength; i++) {
- c = b.snapshotItem(i).firstChild.childNodes[3].textContent.replace(//s*/g,"").slice(0,2);
- c = (Number(c) > 9)?c+"樓":c
- b.snapshotItem(i).innerHTML = "
- 被屏蔽帖子 " +c+" " + bl[x] + "
- ";
- }
- }
- }
- for (x in bl) {
- b =
- document.evaluate('//table/tbody[tr[1]/td[1]/div[1]//font[text()="' +
- bl[x] + '"]]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
- null);
- if (b.snapshotLength) {
- for (var i = 0,c=""; i < b.snapshotLength; i++) {
- c =String(b.snapshotItem(i).firstChild.childNodes[3].textContent.match(//d+#/)).replace(/#/,"樓");
- b.snapshotItem(i).innerHTML = "
- 被屏蔽帖子 "
- +c+" " + bl[x] + "";
- }
- }
- }
- for (x in bl) {
- b =
- document.evaluate('//table/tbody[tr[1]/td[2]//cite/a[text()="' + bl[x] +
- '"]]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
- if (b.snapshotLength) {
- for (var i = 0,c=""; i < b.snapshotLength; i++) {
- b.snapshotItem(i).innerHTML = "";
- }
- }
- }
- ---------------分割線 以下為腳本2 屏蔽回帖用------------------
- // ==UserScript==
- // @name discuz 屏蔽回帖
- // @namespace
- // @include */viewthread.php*
- // @include */thread*
- // @include */redirect.php*
- // @include */forum*
- // @include */forum-redirect-tid*
- // @include */forum-viewthread-tid*
- // ==/UserScript==
- var bl = new Array("id1", "id2");
- for (x in bl) {
- b = document.evaluate('//table/tbody[tr[1]/td[1]//a[text()="' + bl[x] + '"]]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
- if (b.snapshotLength) {
- for (var i = 0,c=""; i < b.snapshotLength; i++) {
- c = b.snapshotItem(i).firstChild.childNodes[3].textContent.replace(//s*/g,"").slice(0,2); //開源軟件:Vevb.com
- c = (Number(c) > 9)?c+" ":c
- b.snapshotItem(i).innerHTML = "
- " +" " + "
- ";
- }
- }
- }
新聞熱點
疑難解答