Skip to content

Instantly share code, notes, and snippets.

@heavyLobster2
Last active May 3, 2020 05:37
Show Gist options
  • Save heavyLobster2/bf16d9e7050145f9cda9384fa3a6dcf3 to your computer and use it in GitHub Desktop.
Save heavyLobster2/bf16d9e7050145f9cda9384fa3a6dcf3 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Hide Yahoo Mail Ad-Block Pop-Up
// @description Hides the annoying ad-block pop-up in Yahoo Mail
// @version 1.0.0
// @author heavyLobster2
// @namespace github.com/heavyLobster2
// @downloadURL https://gist.github.com/heavyLobster2/bf16d9e7050145f9cda9384fa3a6dcf3/raw/HideYahooMailAdBlockPopUp.user.js
// @match *://mail.yahoo.com/*
// @grant none
// ==/UserScript==
(function () {
"use strict";
var removePopup = function () {
var popups = document.querySelectorAll("#modal-outer");
for (var i = 0; i < popups.length; i++) {
var popup = popups[i];
if (popup.getAttribute("aria-labelledby") === "adblock-whitelist-cue") {
popup.remove();
}
}
};
removePopup();
(new MutationObserver(removePopup)).observe(document, { childList: true, subtree: true });
})();
@bamfg
Copy link

bamfg commented May 3, 2020

thank you , keep up the great work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment