您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Shows number of remaining players
- // ==UserScript==
- // @name Remaining Players Script
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description Shows number of remaining players
- // @author Oki
- // @match https://*.jstris.jezevec10.com/*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- window.addEventListener('load', function(){
- /**************************
- Remaining Players Script
- **************************/
- if(typeof trim != "function"){var trim=a=>{a=a.slice(0,-1);a=a.substr(a.indexOf("{")+1);return a}}
- if(typeof getParams != "function"){var getParams=a=>{var params=a.slice(a.indexOf("(")+1);params=params.substr(0,params.indexOf(")")).split(",");return params}}
- if(typeof Game != "undefined"){
- var aliveHold=document.createElement("div");
- aliveHold.id="aliveHolder";
- aliveHold.style.position="absolute"
- aliveHold.style.left = (myCanvas.getBoundingClientRect().left - 200) + "px";
- aliveHold.style.top = (myCanvas.getBoundingClientRect().top + 400) + "px";
- document.body.appendChild(aliveHold);
- var f='<div id="lrem"><div id="aliveNum"></div></div><div id="sprintText"><div id="stLrem" style="display: block;">opponents remaining</div></div>'
- aliveHolder.innerHTML = f
- aliveHolder.style.display='none'
- var printAlive = SlotView['prototype']['printSlotPlace'].toString()
- var printAliveParams = getParams(printAlive);
- printAlive = `aliveHolder.style.display='block';aliveNum.innerHTML=parseInt(this['slot']['gs']['p']['getPlaceColor'](${printAliveParams[0]})['str'])-1;` + trim(printAlive)
- SlotView['prototype']['printSlotPlace'] = new Function(...printAliveParams, printAlive);
- var readyGoAlive = Game['prototype']['restart'].toString()
- readyGoAlive = "if(this['pmode']+this['isPmode'](true)+this['isPmode'](false)==0){aliveHolder.style.display='block';aliveNum.innerHTML='all'};" + trim(readyGoAlive)
- Game['prototype']['restart'] = new Function(readyGoAlive);
- }
- });
- })();