优书网傻逼屏蔽

屏蔽傻逼

  1. // ==UserScript==
  2. // @name 优书网傻逼屏蔽
  3. // @namespace http://www.lkong.net/home.php?mod=space&uid=516696
  4. // @version 0.3
  5. // @description 屏蔽傻逼
  6. // @author 仙圣
  7. // @match *://www.yousuu.com/book/*
  8. // @include *://www.yousuu.com/book/*
  9. // @icon http://www.yousuu.com/favicon.ico
  10. // ==/UserScript==
  11.  
  12.  
  13. (function(){
  14. //屏蔽词列表。
  15. //屏蔽词的双引号为英文半角引号,逗号也是,请勿忘记加逗号。
  16. var blackList = [
  17. "例子1","例子2"
  18.  
  19. ];
  20.  
  21. function 屏蔽傻逼(){
  22.  
  23. var target = document.querySelectorAll("div.BookCommentItem");
  24.  
  25. for (var i = 0;i < target.length; i++){
  26. if (target[i].querySelectorAll("div.comment-author-info>p")[0] != null){
  27. var node = target[i].querySelectorAll("div.comment-author-info>p")[0];
  28.  
  29. for (var j = 0 ;j < blackList.length; j++){
  30. //用户名在黑名单中则删掉
  31. if (node.innerHTML.indexOf(blackList[j]) > -1){
  32. target[i].remove();
  33. }
  34. }
  35. }
  36. }
  37.  
  38. var target2 = document.querySelectorAll("div.ReplyItemWrap");
  39.  
  40. for (var i2 = 0;i2 < target2.length; i2++){
  41. if (target2[i2].querySelectorAll("div.comment-author-info>p")[0] != null){
  42. var node2 = target2[i2].querySelectorAll("div.comment-author-info>p")[0];
  43.  
  44. for (var j2 = 0 ;j2 < blackList.length; j2++){
  45. //用户名在黑名单中则删掉
  46. if (node2.innerHTML.indexOf(blackList[j2]) > -1){
  47. target2[i2].remove();
  48. }
  49. }
  50. }
  51. }
  52.  
  53. }
  54. setInterval(屏蔽傻逼, 2000);
  55. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址