Greasy Fork镜像 支持简体中文。

wanwansub

wanwansub去广告

  1. // ==UserScript==
  2. // @name wanwansub
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.21
  5. // @description wanwansub去广告
  6. // @author You
  7. // @match http://wanwansub.com/*
  8. // @require http://libs.baidu.com/jquery/2.0.0/jquery.min.js
  9. // @grant none
  10. // ==/UserScript==
  11. (function ( ) {
  12. 'use strict';
  13. var $ = $ || window.$;
  14. let isrun = false;
  15. function noad() {
  16. if (isrun) return;
  17. console.log('noad');
  18. isrun = true;
  19. function subnoad(csspath) {
  20. const ad1 = $(csspath);
  21. if (ad1.length > 0)
  22. ad1.css('display', 'none');
  23. }
  24.  
  25. const ad1 = $('body > div:nth-child(5)');
  26. if (ad1.length == 0)
  27. {
  28. console.log('return noad');
  29. isrun = false;
  30. return;
  31. }
  32.  
  33. subnoad('body > div:nth-child(7)');
  34. subnoad('body > div:nth-child(6)');
  35. subnoad('body > div:nth-child(5)');
  36.  
  37. isrun = false;
  38. }
  39.  
  40. noad();
  41. //$('body').bind('DOMNodeInserted', noad);
  42. const config = { //attributes: true,
  43. childList: true,
  44. //subtree: true
  45. };
  46. const observer = new MutationObserver(noad);
  47. observer.observe($('body')[0], config);
  48. // Your code here...
  49. })( );

QingJ © 2025

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