NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Rock Paper Shotgun anti-anti-adblock
// @namespace https://openuserjs.org/users/Mr_FJ
// @description Removes anti-adblock bullsh*t on Rock Paper Shotgun and other gaming websites.
// @copyright 2022, Mr_FJ (https://openuserjs.org/users/Mr_FJ)
// @grant none
// @license MIT
// @version 1.3.4
// @updateURL https://openuserjs.org/meta/Mr_FJ/Rock_Paper_Shotgun_anti-anti-adblock.meta.js
// @downloadURL https://openuserjs.org/install/Mr_FJ/Rock_Paper_Shotgun_anti-anti-adblock.user.js
// @match https://www.rockpapershotgun.com/*
// @match https://www.usgamer.net/*
// @match https://www.eurogamer.net/*
// @match https://www.vg247.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;}');
addGlobalStyle('.leaderboards { height: 0px !important;}');
var element3 = document.querySelectorAll('.sp-message-open');
Array.prototype.forEach.call(element3, function (node) {
console.log(node.style);
node.style.setProperty("overflow-y", "scroll", "important");
node.style.setProperty("position", "relative", "important");
});
if(element3.length == 0)
{
document.body.style.overflow = "scroll";
}
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);
})();