禁用open3dmodel的广告拦截弹窗

移除安装广告拦截插件后导致的弹窗

// ==UserScript==
// @name         禁用open3dmodel的广告拦截弹窗
// @name:en      Disable open3dmodel AD blocker pop-ups
// @namespace    http://tampermonkey.net/
// @version      2024-08-27
// @description  移除安装广告拦截插件后导致的弹窗
// @description:en  Removes pop-ups caused by installing AD blockers
// @author       You
// @match        https://open3dmodel.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=open3dmodel.com
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    const timer = setTimeout(() => {
      if (!document.querySelector('.mdp-deblocker-wrapper')) return;
      run();
    }, 5);

    const run = () => {
      clearTimeout(timer);
      const nodeList = document.querySelectorAll('body.mdp-deblocker-blur>:not(#wpadminbar):not(.mdp-deblocker-modal):not(.mdp-deblocker-wrapper):not(.mdp-deblocker-blackout)');
      nodeList.forEach((el, i) => {
        el.style.webkitFilter = 'blur';
        el.style.filter = 'none';
      });

      document.querySelector('.mdp-deblocker-blackout.active').remove();
      document.querySelector('.mdp-deblocker-wrapper').remove();
    }
})();