您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
3/16/2024, 1:02:56 AM
// ==UserScript== // @name Banner Remover *.tu.edu.np // @namespace Violentmonkey Scripts // @version 1.0 // @grant none // @license GNU GPLv3 // @author imxitiz // @match https://*tu.edu.np/* // @description 3/16/2024, 1:02:56 AM // ==/UserScript== // Function to click on all elements with IDs in the format main-modal-X with a delay of 2 seconds function clickOnMainModals() { // Get all elements matching the pattern let mainModals = document.querySelectorAll('[id^="main-modal-"]'); // Loop through each matching element and click on it with a delay of 2 seconds mainModals.forEach((modal, index) => { let closeButton = modal.querySelector("button.btn-close"); if (closeButton) { setTimeout(() => { closeButton.click(); }, 0); } }); } clickOnMainModals();