您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Shows the amount of connected users next to the amount of all users
当前为
// ==UserScript== // @name Connected Users // @namespace http://tampermonkey.net/ // @version 1.1 // @description Shows the amount of connected users next to the amount of all users // @author guildedbird & azti // @match https://pixelplace.io/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; let canvasTotal = 0 function update() { let value1 = document.querySelector('#chat .online span.value'); let value2 = document.querySelector('span.sub-value'); if (value1 && value2) { let titleText = value1.title; let matchUserTotal = titleText.match(/^\d+/); let matchCanvasTotal = titleText.match(/\s\d+/); if (matchCanvasTotal) canvasTotal = matchCanvasTotal if (matchUserTotal) { let result = matchUserTotal if (canvasTotal > 0) { result += ` & ${canvasTotal}` } value2.textContent = `(${result})`; value2.style.display = 'inline'; value2.style.color = '#b3b3b3'; } } } update(); let observer = new MutationObserver(update); let chatElement = document.querySelector('#chat .online'); if (chatElement) { observer.observe(chatElement, { childList: true, subtree: true, attributes: true }); } function updateCanvasTotal() { const playerList = document.querySelectorAll('.players-list .player') canvasTotal = 0 playerList.forEach(() => { canvasTotal += 1 }) update() } let observer2 = new MutationObserver(updateCanvasTotal) let playerListElement = document.querySelector('.players-list'); if (playerListElement) observer2.observe(playerListElement, { childList: true, subtree: true, attributes: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址