Skip to content

Instantly share code, notes, and snippets.

@jaromero
Last active May 10, 2018 20:39
Show Gist options
  • Save jaromero/16ddbf66c010f5b1acff829612b4b050 to your computer and use it in GitHub Desktop.
Save jaromero/16ddbf66c010f5b1acff829612b4b050 to your computer and use it in GitHub Desktop.
Userscript to trick Adumen into not destroying the page content
// ==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