天堂

删除天堂网站广告

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         天堂
// @version      0.0.4
// @description  删除天堂网站广告
// @author       You
// @include      /^https://\d+maoaq\.com.+$/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=40maoaq.com
// @grant        none
// @license MIT
// @namespace https://greasyfork.org/users/933558
// ==/UserScript==

(function () {
    'use strict';
    const origin = window.location.origin;
    const reg = /http(s)?:\/\/\d+maoaq\.com/img;
    setTimeout(() => {
        if (reg.test(origin)) {
            const ad = document.querySelector('#midBox'),
                fixedAd = document.querySelector('#couplet'),
                btmBox = document.querySelector('#btmBox'),
                listBox = document.querySelector('#listBox'),
                listwoBox = document.querySelector('#listwoBox');
            document.querySelectorAll('.search')[0].style.display = 'block';
            ad.remove();
            fixedAd.remove();
            btmBox.remove();
            listBox && listBox.remove();
            listwoBox && listwoBox.remove();
        }
    })
    // Your code here...
})();