您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove ads from Outlook.com mail interface
当前为
// ==UserScript== // @name Outlook.com Ad Remover // @namespace http://tampermonkey.net/ // @version 1.0 // @description Remove ads from Outlook.com mail interface // @author aspen138 // @match *://outlook.live.com/mail/0/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Function to remove ad elements function removeAds() { // Remove elements with aria-label="广告" (Ad in Chinese) document.querySelectorAll('[aria-label="广告"]').forEach(el => { el.closest('div[class]').remove(); }); // Remove elements with ID starting with 'owaadbar' document.querySelectorAll('[id^="owaadbar"]').forEach(el => { el.closest('div[class]').remove(); }); // Remove ad placeholders or related elements if any document.querySelectorAll('.VdboX, .GssDD, .z0duZ').forEach(el => { el.remove(); }); } // Run on page load window.addEventListener('load', removeAds); // Observe mutations to handle dynamic content (SPA behavior) const observer = new MutationObserver(removeAds); observer.observe(document.body, { childList: true, subtree: true }); })();