Blocks per B2B Script

Shows a ratio of Blocks/B2B

Versione datata 20/07/2019. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Blocks per B2B Script
// @namespace    http://tampermonkey.net/
// @version      0.1.1
// @description  Shows a ratio of Blocks/B2B
// @author       Oki
// @match        https://*.jstris.jezevec10.com/*
// @grant        none
// ==/UserScript==

/**************************
   Blocks per B2B Script
**************************/

var STAT_POS = 990;

(function() {
    window.addEventListener('load', function(){

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 queueBoxFunc = Game['prototype']['updateQueueBox'].toString()

readyGoFunc = "this['GameStats'].addStat(new StatLine('BPBB', 'B2B', "+STAT_POS+"),true);" + trim(readyGoFunc)
queueBoxFunc = "stat=this['placedBlocks']/this['gamedata']['B2B'];if(this['GameStats'].get('BPBB'))this['GameStats'].get('BPBB').set((stat==Infinity||isNaN(stat))?('∞'):(stat.toFixed(2)));" + trim(queueBoxFunc);

Game['prototype']["startReadyGo"] = new Function(readyGoFunc);
Game['prototype']["updateQueueBox"] = new Function(queueBoxFunc);

    });
})();