虎扑屏蔽用

Bonk!

  1. // ==UserScript==
  2. // @name 虎扑屏蔽用
  3. // @namespace 敲掉我不想看到的部分
  4. // @version 0.3
  5. // @description Bonk!
  6. // @author 路过虎扑原版的jr
  7. // @match *://*.hupu.com/*
  8. // @icon https://cdn-icons-png.flaticon.com/512/6788/6788572.png?x-oss-process=image/resize,m_fill,w_72,h_72
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. // 黑名单设置
  14. var blacklists = [
  15. '阿成','成都哥','内鬼','黑泥', '测试用词',
  16. '白白胖胖哦',
  17. "不要阴阳怪气",
  18. '秀b2',
  19. 'hupu_4c19370d28c9a123',
  20. '稻妻三板斧',
  21. '白术king',
  22. '斯卡拉姆齐夜兰',
  23. '17岁的单车和我',
  24. '苏州城外的微笑z',
  25. '我的花莱仕到了',
  26. '成都人吊打北上光',
  27. 'Last成'];
  28.  
  29. // 判断网页元素是否含有黑名单
  30. function checking(htmlElement) {
  31. for(var i = 0; i < blacklists.length; i++) {
  32. if(htmlElement.innerText.indexOf(blacklists[i]) !== -1) {
  33. return true
  34. }
  35. }
  36. }
  37.  
  38. // bonk!
  39. function bonking(bonkingEl, destination) {
  40. for(var bonk = 0; bonk < bonkingEl.length; bonk++) {
  41. if(checking(bonkingEl[bonk]) == true) {
  42. bonkingEl[bonk].closest(destination).style.display = 'none';
  43. }
  44. }
  45. }
  46.  
  47. // 选取元素
  48. //
  49. var postTitle = document.querySelectorAll('.p-title');
  50. var postAuthor = document.querySelectorAll('.post-auth');
  51. var post = '.bbs-sl-web-post-body'
  52. //
  53. var commentAuthor = document.querySelectorAll('.user-base-info');
  54. var bonkQuoting = document.querySelectorAll('.index_quote-text__HggrH');
  55. var comment = '.post-reply-list '
  56. //
  57. var myMessage = ".bbs-message-web-container .my-message .content .item .right .top .nickname";
  58. var myChat = ".personalWarp .prersonbody .prersonbodymiddle .presonListCardItem .nickNameTitle";
  59. var bbsMessage = document.querySelectorAll(myMessage);
  60. var bbsChat = document.querySelectorAll(myChat);
  61. var userCard = ".personalWarp .prersonbody .prersonbodymiddle .presonListCardItem"
  62.  
  63. // 登 龙 剑
  64. bonking(postTitle, post);
  65. bonking(postAuthor, post);
  66.  
  67. bonking(commentAuthor, comment);
  68. bonking(bonkQuoting, comment);
  69.  
  70. bonking(bbsMessage, '.item');
  71. bonking(bbsChat, userCard);
  72.  
  73.  
  74.  

QingJ © 2025

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