Skip to content

Instantly share code, notes, and snippets.

@bond-
Created November 9, 2016 01:21
Show Gist options
  • Save bond-/4fd6248c8cec20be87d36fc738786670 to your computer and use it in GitHub Desktop.
Save bond-/4fd6248c8cec20be87d36fc738786670 to your computer and use it in GitHub Desktop.
Tamper monkey script to override annoying adblock popup of timesofindia
// ==UserScript==
// @name TOI Adblock pop-up override
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://*.indiatimes.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var r=function(){var t = "";var p = "abcdefghijklmnopqrstuvwxyz";for(var i=0;i<5;i++)t+=p.charAt(Math.floor(Math.random()*p.length));return t;};
var e = document.getElementsByTagName('body')[0];
var d = document.createElement(r());
var c = document.getElementById('container');
var w = document.getElementById('blwrapper');
var bc = document.getElementById('blcontent');
if(w)w.parentNode.removeChild(w);
if(bc)bc.parentNode.removeChild(bc);
if (c)c.style="";
d.innerHTML = e.innerHTML;
e.parentNode.insertBefore(d, e);
e.parentNode.removeChild(e);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment