Ad Skipper Eurogamer.net

By deleted user Last update Jun 19, 2005 — Installed 1,202 times.
/*
    (c) Carlo Zottmann, carlo@g-blog.net
    http://G-Spotting.net/

    Copy, use, modify, spread as you see fit.
*/

// ==UserScript==
// @name            Ad Skipper Eurogamer.net
// @namespace       http://docs.g-blog.net/code/greasemonkey
// @description     2005-04-28: Disables the content area ads on Eurogamer.net.
// @include         http://*eurogamer.net*
// ==/UserScript==

(function() {

    var AdSkipper =
    {
        checkPage: function()
        {
            currentURL = location.href;
            currentDoc = document;

            if (currentURL.match(/^http:\/\/(www\.)?eurogamer\.net\//))
            {
                this.injectCSS(".adMPU, .mpuAd { display: none; }\n");
            }
        },


        injectCSS: function(css)
        {
            head = document.getElementsByTagName("head")[0];
            style = document.createElement("style");
            style.setAttribute("type", 'text/css');
            style.innerHTML = css;
            head.appendChild(style);
        },



        ignSkipAd: function()
        {
            document.forward_form.submit();
        }
    }

    AdSkipper.checkPage();

})();