删除OPGG页面底部的脚本提示

删除OPGG页面底部的脚本提示遮挡

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         删除OPGG页面底部的脚本提示
// @name:en      Remove the script notification at the bottom of the OPGG page
// @name:en-GB   Remove the script notification at the bottom of the OPGG page
// @name:ko      OP.GG 페이지 하단의 스크립트 알림을 제거합니다
// @name:zh      删除OPGG页面底部的脚本提示
// @name:zh-CN   删除OPGG页面底部的脚本提示
// @name:zh-HK   移除OPGG頁面底部的腳本提示
// @name:zh-MO   移除OPGG頁面底部的腳本提示
// @name:zh-MY   删除OPGG页面底部的脚本提示
// @name:zh-SG   删除OPGG页面底部的脚本提示
// @name:zh-TW   移除OPGG頁面底部的腳本提示
// @namespace    http://tampermonkey.net/
// @version      1.0.1
// @description  删除OPGG页面底部的脚本提示遮挡
// @description:en     Remove the script notification at the bottom of the OPGG page that blocks the view.
// @description:en-GB  Remove the script notification at the bottom of the OPGG page that blocks the view.
// @description:ko     OP.GG 페이지 하단에서 화면을 가리는 스크립트 알림을 제거합니다.
// @description:zh     删除OPGG页面底部的脚本提示遮挡
// @description:zh-CN  删除OPGG页面底部的脚本提示遮挡
// @description:zh-HK  移除OPGG頁面底部的腳本提示遮擋
// @description:zh-MO  移除OPGG頁面底部的腳本提示遮擋
// @description:zh-MY  删除OPGG页面底部的脚本提示遮挡
// @description:zh-SG  删除OPGG页面底部的脚本提示遮挡
// @description:zh-TW  移除OPGG頁面底部的腳本提示遮擋
// @license      Copyright © 2025 Leon. All rights reserved.
// @author       Leon
// @match        https://*.op.gg/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=op.gg
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    let timer = setInterval(() => {
       const picSrc = 'https://www.gstatic.com/images/icons/material/system/1x/warning_amber_24dp.png';

       let body = document.body;
       let allElements = body.querySelectorAll('*');

       allElements.forEach(element => {
           
           if (element.tagName.toLowerCase() === 'img' && element.src === picSrc) {
               removeGrandparent(element);
               // clearInterval(timer);

           }
       });

       function removeGrandparent(element) {
           if (element?.parentNode?.parentNode) {
               element.parentNode.parentNode.remove();
           }
       }
   }, 1000);
})();