您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Predicts cheese time/block count
当前为
- // ==UserScript==
- // @name Cheese Pace Script
- // @namespace http://tampermonkey.net/
- // @version 0.21
- // @description Predicts cheese time/block count
- // @author Oki
- // @match https://*.jstris.jezevec10.com/*
- // @grant none
- // ==/UserScript==
- /**************************
- Cheese Pace Script
- **************************/
- (function() {
- window.addEventListener('load', function(){
- url = window.location.href
- if(~url.indexOf("play=3")){
- var rect = holdCanvas.getBoundingClientRect();
- var p = document.createElement("div");
- p.id = "pace"
- p.style = ("color:#999;width:150px;position:absolute;top:"+(rect.top+400)+"px;left:"+(rect.left-50)+"px")
- p.innerHTML = `
- <table style='width:100%;height:100%;table-layout:fixed;'>
- <tr>
- <th style='text-align:center' colspan="2">Pace:</th>
- </tr>
- <tr>
- <td>Time:</td>
- <td id='paceTime'>0</td>
- </tr>
- <tr>
- <td># </td>
- <td id='pacePieces'>0</td>
- </tr>
- </table>
- `
- document.body.appendChild(p);
- if(typeof trim != "function"){var trim=a=>{a=a.slice(0,-1);a=a.substr(a.indexOf("{")+1);return a}}
- var queueBoxFunc = Game['prototype']['updateQueueBox'].toString()
- window.formatTime = function(seconds) {
- m = Math.floor(seconds / 60)
- s = Math.floor(seconds % 60)
- ms = Math.floor((seconds % 1)*100)
- return (m?(m+":"):'')+("0"+s).slice(-2)+"."+("0"+ms).slice(-2)
- }
- function paces() {
- totalLines = this["cheeseModes"][this["sprintMode"]]
- linesLeft = lrem.innerHTML
- linesCleared = totalLines - linesLeft
- timePace = ((totalLines/linesCleared) * this["clock"])
- piecePace = ((linesLeft/linesCleared)*this["placedBlocks"] + this["placedBlocks"])
- paceTime.innerHTML= (timePace*0+1)?formatTime(timePace):'0';
- pacePieces.innerHTML= (piecePace*0+1)?Math.floor(piecePace):'0';
- }
- queueBoxFunc = trim(paces.toString()) + trim(queueBoxFunc);
- Game['prototype']["updateQueueBox"] = new Function(queueBoxFunc);
- }
- });
- })();