您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Clean up msn weather to use as a web app to remove ads while using a popup blocker
// ==UserScript== // @name MSN weather app page fixer // @namespace http://tampermonkey.net/ // @version 2025-05-25-1 // @description Clean up msn weather to use as a web app to remove ads while using a popup blocker // @author guywmustang // @match https://www.msn.com/*/weather* // @require https://code.jquery.com/jquery-3.7.1.min.js // @run-at document-end // @icon https://www.google.com/s2/favicons?sz=64&domain=msn.com // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; jQuery.noConflict(); var $ = jQuery; function waitForElement(selector, callback) { const interval = setInterval(() => { const element = document.querySelector(selector); if (element) { clearInterval(interval); callback(element); } }, 100); // Check every 100ms } $(document).ready(() => { console.log("ready"); // Usage waitForElement('.weatherMobileUpsellContainer-DS-EntryPoint1-1', (element) => { console.log('weather mobile link exists, clean up page:', element); // Perform actions on the element // Remove top bar $("#header").remove(); // Remove mobile link garbage $(".weatherMobileUpsellRoot-DS-EntryPoint1-1 > div")[0].remove(); }); waitForElement('.commentOverlayContainer-DS-EntryPoint1-1', (element) => { console.log("removing comment div"); element.remove(); }); }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址