UViewPlus跳过强制观看广告弹窗

UViewPlus跳过强制观看广告弹窗, 方便查询文挡

// ==UserScript==
// @name         UViewPlus跳过强制观看广告弹窗
// @namespace    http://tampermonkey.net/
// @version      0.1
// @author       monkey
// @description  UViewPlus跳过强制观看广告弹窗, 方便查询文挡
// @icon         ./uviewnoadicon.jpg
// @match        https://uiadmin.net/*
// @grant        none
// @noframes
// @license MIT
// ==/UserScript==

(function () {
  'use strict';

  (function() {
    function init() {
      console.log("脚本已加载");
      const testDiv = document.createElement("div");
      testDiv.style.position = "fixed";
      testDiv.style.top = "10px";
      testDiv.style.right = "6px";
      testDiv.style.padding = "10px";
      testDiv.style.background = "red";
      testDiv.style.color = "white";
      testDiv.style.zIndex = "9999";
      testDiv.style.cursor = "pointer";
      testDiv.style.borderRadius = "8px";
      testDiv.textContent = "×遮挡广告";
      document.body.appendChild(testDiv);
      testDiv.addEventListener("click", function() {
        if (document.getElementById("ad-block-style")) return;
        const style = document.createElement("style");
        style.type = "text/css";
        style.id = "ad-block-style";
        style.textContent = ".v-modal {top: 9999px!important;}#vip-box {top: 9999px!important;}";
        document.head.appendChild(style);
      });
    }
    if (document.readyState === "loading") {
      document.addEventListener("DOMContentLoaded", init);
    } else {
      init();
    }
  })();

})();