Last active
May 10, 2018 20:39
-
-
Save jaromero/16ddbf66c010f5b1acff829612b4b050 to your computer and use it in GitHub Desktop.
Userscript to trick Adumen into not destroying the page content
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 Fuck You Adumen | |
// @namespace http://gm.pulsar.mx/ | |
// @version 0.1 | |
// @description Trick Adumen into not destroying the page content | |
// @author Antonio Romero | |
// @match http://*.wikia.com/* | |
// @match https://*.wikia.com/* | |
// @grant none | |
// @downloadURL https://gist.github.com/raw/16ddbf66c010f5b1acff829612b4b050/fuck-adumen.js | |
// @updateURL https://gist.github.com/raw/16ddbf66c010f5b1acff829612b4b050/fuck-adumen.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Somehow adding a setter makes the initial assignment not even work | |
// It works afterwards, and it still prevents Adumen from deleting all | |
// content so whatever | |
Object.assign(window, { | |
set ads(v) { | |
if (v && v.context && v.context.opts) { | |
v.context.opts.showAds = false; | |
v.context.opts.pageFairRecovery = false; | |
} | |
this.ads = v; | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment