Last Updated: February 25, 2016
·
1.14K
· pncolvr

Greasemonkey: remove 9gag 3 minute overlay

Simply create a user script on greasemonkey with the following code.

// ==UserScript==
// @name           Remove idle
// @namespace      com.pncolvr
// @include        http://9gag.com/*
// @include        /*.9gag.com/*
// ==/UserScript==

function removeElement(elementName) {
    var el = document.getElementById(elementName);
    if (el == null) {
        el = document.getElementsByClassName('section-nav')[0];
    }
    el.parentNode.removeChild(el);
    console.log('removed idle ' + elementName);
}
window.onload = function (e) {
    removeElement('jsid-idle-popup-container');
    removeElement('overlay-container');
}

Enjoy 9gag without the annoying overlay. :)