zuanke8.com topics blocking tools

zuanke8.com junk blocking

  1. // ==UserScript==
  2. // @name zuanke8.com topics blocking tools
  3. // @namespace discuz
  4. // @description:en zuanke8.com junk blocking
  5. // @description:zh 屏蔽赚吧包含特定关键字和用户的主题不予显示,减少水帖干扰。
  6. // @include http://www.zuanke8.com/*
  7. // @version 0.0.1
  8. // @description zuanke8.com junk blocking
  9. // ==/UserScript==
  10.  
  11. // 主题列表页
  12. var btopics = new Array("小知", "斐讯", "和包");
  13. for (x in btopics) {
  14. xtopics = document.evaluate('//table/tbody[tr[1]/th[1]//a[contains(text(),"' + btopics[x] + '")]]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
  15. if (xtopics.snapshotLength) {
  16. for (var i = 0, c = ""; i < xtopics.snapshotLength; i++) {
  17. xtopics.snapshotItem(i).innerHTML = "<tbody style='display:none;'></tbody>";
  18. }
  19. }
  20. }
  21.  
  22. // 屏蔽特定用户的发帖
  23. // 直接填写用户名在引号里面,每组引号用半角逗号隔开。
  24. var abusers = new Array("", "");
  25. for (x in abusers) {
  26. abuser = document.evaluate('//table/tbody[tr[1]/td[2]//cite/a[text()="' + abusers[x] + '"]]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
  27. if (abuser.snapshotLength) {
  28. for (var i = 0, c = ""; i < abuser.snapshotLength; i++) {
  29. abuser.snapshotItem(i).innerHTML = "<tbody style='display:none;'></tbody>";
  30. }
  31. }
  32. }