Created
November 4, 2017 22:09
-
-
Save friendlyanon/ddc7ae83744dd612a554dbd19c0bc30b to your computer and use it in GitHub Desktop.
Disable popup on moongourd.com
This file contains hidden or 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 Disable Moongourd alert | |
// @namespace intermission | |
// @match *://moongourd.com/* | |
// @match *://*.moongourd.com/* | |
// @version 1 | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
"use strict"; | |
const orig = window.alert.bind(window); | |
Object.defineProperty(window, "alert", { | |
value: function alert(msg) { | |
if (~msg.indexOf("cancerous pop-ups")) return; | |
orig(msg); | |
}, | |
enumerable: true, | |
configurable: true, | |
writable: true | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment