您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
block the horizontal and the vertical ad bars
// ==UserScript== // @name Yandex Mail Adblock // @namespace Violentmonkey Scripts // @match https://mail.yandex.ru/* // @grant none // @version 1.0.2 // @author lavrent // @description block the horizontal and the vertical ad bars // @license MIT // ==/UserScript== (() => { function clearAds() { const adsVBar = document.querySelector('[class^="PageLayout-m__body--"]'); if (adsVBar && adsVBar.children.length === 2) { adsVBar.children[1].remove(); } const headerDiv = document.querySelector('[class^="ContentHeader-m__header--"]'); if (headerDiv && headerDiv.children.length === 3) { headerDiv.children[1].remove(); } } const observer = new MutationObserver(clearAds); const page = document.querySelector('[class^="PageLayout-m__main--"]'); observer.observe(page, { childList: true, subtree: true }); })();