Last active
May 3, 2020 05:37
-
-
Save heavyLobster2/bf16d9e7050145f9cda9384fa3a6dcf3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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 }); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment