Shellshock.io Remove adblocker message

Block the adblocker message

Versión del día 28/7/2022. Echa un vistazo a la versión más reciente.

// ==UserScript==
// @name         Shellshock.io Remove adblocker message
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Block the adblocker message
// @author       mewen25
// @match        https://shellshock.io/
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @run-at       document-start
// ==/UserScript==

window.XMLHttpRequest = class extends window.XMLHttpRequest {

	open( method, url ) {
		if ( url.indexOf( 'shellshock.js' ) > - 1 ) {
			this.isScript = true;
		}
		return super.open( ...arguments );
	}

	get response() {
		if ( this.isScript ) {
			let code = super.response;
            const ad = /showAdBlockerVideo\(\),setTimeout\(\(\)=>\{vueApp\.hideAdBlockerVideo\(\),vueApp\.gameUiRemoveClassForNoScroll\(\),yi\(\)\},1e4\)\)\}/.exec(code)[0];

			console.log( '[INJECTING] - anti anti-adblock');

            const replaceAd = 'hideAdBlockerVideo(),setTimeout(()=>{yi()},100))}';

            code = code.replace(ad, replaceAd);
            return code;
 		}
		return super.response;
	}
};