Greasy Fork is available in English.

Blocks per B2B Script

Shows a ratio of Blocks/B2B

  1. // ==UserScript==
  2. // @name Blocks per B2B Script
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1.1
  5. // @description Shows a ratio of Blocks/B2B
  6. // @author Oki
  7. // @match https://*.jstris.jezevec10.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. /**************************
  12. Blocks per B2B Script
  13. **************************/
  14.  
  15. var STAT_POS = 990;
  16.  
  17. (function() {
  18. window.addEventListener('load', function(){
  19.  
  20. if(typeof trim != "function"){var trim=a=>{a=a.slice(0,-1);a=a.substr(a.indexOf("{")+1);return a}}
  21.  
  22. var readyGoFunc = Game['prototype']["startReadyGo"].toString()
  23. var queueBoxFunc = Game['prototype']['updateQueueBox'].toString()
  24.  
  25. readyGoFunc = "this['GameStats'].addStat(new StatLine('BPBB', 'B2B', "+STAT_POS+"),true);" + trim(readyGoFunc)
  26. 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);
  27.  
  28. Game['prototype']["startReadyGo"] = new Function(readyGoFunc);
  29. Game['prototype']["updateQueueBox"] = new Function(queueBoxFunc);
  30.  
  31. });
  32. })();