移除OPGG頁面底部的腳本提示

移除OPGG頁面底部的腳本提示遮擋

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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);
})();