Shows how often hold was used
当前为
// ==UserScript==
// @name Hold Stat Script
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Shows how often hold was used
// @author Oki
// @match https://*.jstris.jezevec10.com/*
// @grant none
// ==/UserScript==
/**************************
Hold Stat Script
**************************/
(function() {
window.addEventListener('load', function(){
var STAT_POS = 970;
if(typeof trim != "function"){var trim=a=>{a=a.slice(0,-1);a=a.substr(a.indexOf("{")+1);return a}}
var readyGoFunc = Game['prototype']["startReadyGo"].toString()
var holdBlockFunc = GameCore['prototype']['holdBlock'].toString()
readyGoFunc = "holdStat=0;this['GameStats'].addStat(new StatLine('HOLD_FREQ', 'Hold', "+STAT_POS+"),true);" + trim(readyGoFunc)
holdBlockFunc = "if(!this['holdUsedAlready']&&this['holdEnabled']){holdStat++};if(this['GameStats'].get('HOLD_FREQ'))this['GameStats'].get('HOLD_FREQ').set(holdStat);" + trim(holdBlockFunc);
Game['prototype']["startReadyGo"] = new Function(readyGoFunc);
GameCore['prototype']['holdBlock'] = new Function(holdBlockFunc);
});
})();