天堂

删除天堂网站广告

目前為 2023-05-06 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name 天堂
  3. // @version 0.0.2
  4. // @description 删除天堂网站广告
  5. // @author You
  6. // @match http*://*.com/
  7. // @match http*://*.com/
  8. // @match http*://*/maotype/*
  9. // @match http*://*/maoplay/*
  10. // @icon https://www.google.com/s2/favicons?sz=64&domain=35maoaq.com
  11. // @grant none
  12. // @license MIT
  13. // @namespace https://greasyfork.org/users/933558
  14. // ==/UserScript==
  15.  
  16. (function() {
  17. 'use strict';
  18. const origin = window.location.origin;
  19. const reg = /http(s)?:\/\/\d+maoaq\.com/img;
  20. setTimeout(() => {
  21. if(reg.test(origin)) {
  22. const ad = document.querySelector('#midBox'),
  23. fixedAd = document.querySelector('#couplet'),
  24. btmBox = document.querySelector('#btmBox'),
  25. listBox = document.querySelector('#listBox'),
  26. listwoBox = document.querySelector('#listwoBox');
  27. ad.remove();
  28. fixedAd.remove();
  29. btmBox.remove();
  30. listBox && listBox.remove();
  31. listwoBox && listwoBox.remove();
  32. }
  33. })
  34. // Your code here...
  35. })();