您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove the adblock popup, as well as the respawn timer to avoid the extra wait in shell shockers
当前为
- // ==UserScript==
- // @name Shellshock.io Remove Adblocker messages & respawn timer
- // @namespace http://tampermonkey.net/
- // @version 0.4
- // @description Remove the adblock popup, as well as the respawn timer to avoid the extra wait in shell shockers
- // @author mewen25
- // @match https://shellshock.io/
- // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
- // @grant none
- // @run-at document-start
- // ==/UserScript==
- var open_prototype = XMLHttpRequest.prototype.open, intercept_response = function(callback) {
- XMLHttpRequest.prototype.open = function(method, url) {
- if(url.indexOf("shellshock.js") > -1) this.isScript = true;
- this.addEventListener('readystatechange', function(event) {
- if ( this.readyState === 4 && this.isScript ) {
- var response = callback(event.target.responseText);
- Object.defineProperty(this, 'response', {writable: true});
- Object.defineProperty(this, 'responseText', {writable: true});
- this.response = this.responseText = response;
- }
- });
- return open_prototype.apply(this, arguments);
- };
- };
- intercept_response(function(response) {
- const [adLine, adVar1, adVar2] = /function (.{2})\(e\){.\?.+?(?=}f)}function (.{2})/.exec(response);
- const [timer, timerVar, timerVar2, timerVar3] = /function (.{2})\(e\){(.{2})=M.+?(?=1,)1,(.{17}).+?(?=var)/.exec(response);
- if(!adLine || !adVar1 || !adVar2) {
- console.log('error doing anti adblock')
- } else {
- console.log("[INJECTING] - Adblock popup block");
- const replaceAd = `function ${adVar1}(e){console.log("[ADBLOCK]-blocked"),${adVar2}()}function ${adVar2}`
- response = response.replace(adLine, replaceAd);
- }
- if(!timer || !timerVar || !timerVar2 || !timerVar3) {
- console.log('error doing timer block');
- }
- else {
- console.log("[INJECTING - timer block");
- response = response.replace(timer, `function ${timerVar}(e){setTimeout(()=>{${timerVar2}=-1,${timerVar3}},3000)}`);
- }
- return response;
- });