您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
restarts game automatically when you go too slow
当前为
// ==UserScript== // @name Under PPS Restart Script // @namespace http://tampermonkey.net/ // @version 0.1 // @description restarts game automatically when you go too slow // @author Oki // @match https://*.jstris.jezevec10.com/* // @grant none // ==/UserScript== /************************** Under PPS Restart Script **************************/ (function() { window.addEventListener('load', function(){ localStorage.restartOption = localStorage.restartOption || "0"; localStorage.restartThreshold = localStorage.restartThreshold || "0"; var pbOption = document.createElement("table"); pbOption.innerHTML = `<tbody><tr><td><input name='group'onclick="localStorage.restartOption=0"id='soundPPS'type="radio"><label for="soundPPS">Play a sound</label></td><td><input onclick="localStorage.restartOption=1" id='restartPPS' name='group' type="radio"><label for="restartPPS">Restart the run</label></td></tr><tr><td colspan="2"><span>when PPS goes below <input oninput='localStorage.restartThreshold=this.value'id='threshold'style="width:50px"></span></td></tr></tbody><br>` tab_other.appendChild(pbOption) document.getElementsByName("group")[+localStorage.restartOption].checked = 1 threshold.value = localStorage.restartThreshold var trim=a=>{a=a.slice(0,-1);a=a.substr(a.indexOf("{")+1);return a} var readyGo = Game['prototype']["readyGo"].toString() readyGo = `setTimeout(x=>eval('if(0<threshold.value)var checkPPS=setInterval(function(){if(+PPS.innerText<+threshold.value&&0!=+PPS.innerText){if(document.getElementsByName("group")[0].checked&&+localStorage.SE){var a=new Audio("https://jstris.jezevec10.com/res/se0/fault.wav");if(vol=document.getElementById("vol-control").value)a.volume=vol/100;a.play()}else document.dispatchEvent(new KeyboardEvent("keydown",{keyCode:localStorage.k9}));clearInterval(checkPPS)}},200);'), 5000);` + trim(readyGo) Game['prototype']["readyGo"] = new Function(readyGo); }); })();