屏蔽圣王薇薇欧的无头漫画讨论贴

用于在NGA猴区屏蔽屏蔽圣王薇薇欧的无头漫画讨论贴

  1. // ==UserScript==
  2. // @name 屏蔽圣王薇薇欧的无头漫画讨论贴
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.5
  5. // @description 用于在NGA猴区屏蔽屏蔽圣王薇薇欧的无头漫画讨论贴
  6. // @author a
  7. // @match *://bbs.nga.cn/thread.php?fid=-447601*
  8. // @match *://nga.178.com/thread.php?fid=-447601*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. function doRemove() {
  15. var topicRows = document.getElementsByClassName("topicrow");
  16. for (var i = topicRows.length - 1; i >= 0; --i) {
  17. var topicRow = topicRows[i];
  18. var author = topicRow.getElementsByClassName("author")[0].textContent;
  19. if (author !== "圣王薇薇欧") {
  20. continue;
  21. }
  22. var title = topicRow.getElementsByClassName("c2")[0].textContent;
  23. if (title.indexOf("漫画讨论") < 0) {
  24. continue;
  25. }
  26. topicRow.parentNode.remove();
  27. }
  28. }
  29. function hookProgbar() {
  30. var originProgFunc = commonui.progbar;
  31. commonui.progbar = function(v) {
  32. if (v === 100){
  33. console.log('in hooked func');
  34. setTimeout(doRemove, 500);
  35. }
  36. return originProgFunc.apply(this, arguments);
  37. }
  38. }
  39. hookProgbar();
  40.  
  41. setTimeout(doRemove, 500);
  42. })();

QingJ © 2025

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