Greasy Fork is available in English.

Cheese Pace Script

Predicts cheese time/block count

  1. // ==UserScript==
  2. // @name Cheese Pace Script
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.21
  5. // @description Predicts cheese time/block count
  6. // @author Oki
  7. // @match https://*.jstris.jezevec10.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. /**************************
  12. Cheese Pace Script
  13. **************************/
  14.  
  15. (function() {
  16. window.addEventListener('load', function(){
  17.  
  18.  
  19. url = window.location.href
  20. if(~url.indexOf("play=3")){
  21.  
  22.  
  23. var rect = holdCanvas.getBoundingClientRect();
  24. var p = document.createElement("div");
  25. p.id = "pace"
  26. p.style = ("color:#999;width:150px;position:absolute;top:"+(rect.top+400)+"px;left:"+(rect.left-50)+"px")
  27. p.innerHTML = `
  28. <table style='width:100%;height:100%;table-layout:fixed;'>
  29. <tr>
  30. <th style='text-align:center' colspan="2">Pace:</th>
  31. </tr>
  32. <tr>
  33. <td>Time:</td>
  34. <td id='paceTime'>0</td>
  35. </tr>
  36. <tr>
  37. <td># </td>
  38. <td id='pacePieces'>0</td>
  39. </tr>
  40. </table>
  41. `
  42. document.body.appendChild(p);
  43.  
  44.  
  45. if(typeof trim != "function"){var trim=a=>{a=a.slice(0,-1);a=a.substr(a.indexOf("{")+1);return a}}
  46.  
  47. var queueBoxFunc = Game['prototype']['updateQueueBox'].toString()
  48.  
  49. window.formatTime = function(seconds) {
  50. m = Math.floor(seconds / 60)
  51. s = Math.floor(seconds % 60)
  52. ms = Math.floor((seconds % 1)*100)
  53. return (m?(m+":"):'')+("0"+s).slice(-2)+"."+("0"+ms).slice(-2)
  54. }
  55.  
  56. function paces() {
  57.  
  58. totalLines = this["cheeseModes"][this["sprintMode"]]
  59. linesLeft = lrem.innerHTML
  60. linesCleared = totalLines - linesLeft
  61.  
  62. timePace = ((totalLines/linesCleared) * this["clock"])
  63. piecePace = ((linesLeft/linesCleared)*this["placedBlocks"] + this["placedBlocks"])
  64.  
  65. paceTime.innerHTML= (timePace*0+1)?formatTime(timePace):'0';
  66. pacePieces.innerHTML= (piecePace*0+1)?Math.floor(piecePace):'0';
  67. }
  68.  
  69. queueBoxFunc = trim(paces.toString()) + trim(queueBoxFunc);
  70. Game['prototype']["updateQueueBox"] = new Function(queueBoxFunc);
  71.  
  72. }
  73.  
  74. });
  75. })();