Mr_FJ Author

Adding it using the ditor instead of as a file seems to have worked, too bad the filename is not as clean.



I already have a script on my page, and I copied the info block from that script, but for some reason I'm getting a 404 "Selected file is not JavaScript." error when I try to upload it... Any idea why?

// ==UserScript==
// @namespace    https://openuserjs.org/users/Mr_FJ
// @name         RockPaperShotgun anti-anti-adblock
// @description  Removes RockPaperShotgun's anti-adblock bullsh*t.
// @copyright    2019, Mr_FJ (https://openuserjs.org/users/Mr_FJ)
// @grant        none
// @license      MIT
// @version      1.0
// @updateURL    https://openuserjs.org/meta/Mr_FJ/RPSAntiAntiAdblock.meta.js
// @downloadURL  https://openuserjs.org/install/Mr_FJ/RPSAntiAntiAdblock.user.js
// @match        https://www.rockpapershotgun.com/*
// ==/UserScript==

// ==OpenUserJS==
// @author Mr_FJ
// ==/OpenUserJS==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}
(function() {
    setTimeout(function() {
        addGlobalStyle('.no-js { overflow-y: visible !important;}');
        addGlobalStyle('.ads-enabled { overflow-y: visible !important;}');
        var element = document.querySelectorAll('div[class*="sp_message_container"]');
        Array.prototype.forEach.call( element, function( node ) {
            node.parentNode.removeChild( node );
        });
        var element2 = document.querySelectorAll('div[class*="sp_veil"]');
        Array.prototype.forEach.call( element2, function( node ) {
            node.parentNode.removeChild( node );
        });
     }, 5000);
})();