tieba_hide_someword

屏蔽包含特定关键字的主题

  1. // ==UserScript==
  2. // @name tieba_hide_someword
  3. // @description 屏蔽包含特定关键字的主题
  4. // @include http://tieba.baidu.com/*
  5. // @exclude http://tieba.baidu.com/tb*
  6. // @icon http://tb.himg.baidu.com/sys/portraitn/item/4e2ed7f8bbb3d4f2c2d2bb21
  7. // @author congxz6688
  8. // @version 2013.5.5
  9. // @namespace https://greasyfork.org/scripts/160
  10. // ==/UserScript==
  11.  
  12. var someone = ["关键字甲", "关键字乙"]; //黑名单
  13.  
  14. var $ = unsafeWindow.$;
  15.  
  16. for (j = 0; j < someone.length; j++) {
  17. $('tr').each(function () { //旧版
  18. if ($(this).find('.thread_title>a').text().indexOf(someone[j]) != -1) {
  19. $(this).remove();
  20. }
  21. });
  22. $('li').each(function () { //新版
  23. if ($(this).find('.j_th_tit').text().indexOf(someone[j]) != -1) {
  24. $(this).remove();
  25. }
  26. });
  27. }