Skip to content

Instantly share code, notes, and snippets.

@friendlyanon
Created November 4, 2017 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save friendlyanon/ddc7ae83744dd612a554dbd19c0bc30b to your computer and use it in GitHub Desktop.
Save friendlyanon/ddc7ae83744dd612a554dbd19c0bc30b to your computer and use it in GitHub Desktop.
Disable popup on moongourd.com
// ==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