您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Changes the skill level display to show decimal places
当前为
// ==UserScript== // @name Soulforged Skill Decimals // @description Changes the skill level display to show decimal places // @version 1.1.3 // @include *://soulforged.net:8443/* // @include *://soulforged.net/* // @include *://soulforged.westeurope.cloudapp.azure.com/* // @include *://soulsreforged.eastus.cloudapp.azure.com/* // @include *://play.soulforged.net/* // @namespace soulforged.net // @grant none // @author Zap // ==/UserScript== //assuming there is just the one window.addEventListener("click", waitDecimalizeSkills); function waitDecimalizeSkills() { //hope the DOM and all the required content is updated after a bit setTimeout(decimalizeSkills, 25); } function decimalizeSkills() { var indicators = document.getElementsByClassName("skill-indicator"); //iterate all skill indicators for(var indicator of indicators) { //find the bar element and extract the fill percentage var width = indicator.getElementsByClassName("skill-meter")[0].getElementsByClassName("meter-clip")[0].style.width; var percentage = width.substring(0, width.length - 1); //eliminate percentage sign //determine base skill level from element style class var i = 0; while(true) { if(indicator.getElementsByClassName("skill-level")[0].classList.contains("skill-level-" + i)) { var skillLevel = i; break; } i++; } var skillDecimal = skillLevel + (percentage / 100); indicator.getElementsByClassName("skill-level")[0].innerHTML = skillDecimal.toFixed(3); indicator.getElementsByClassName("skill-level")[0].style.fontSize = "35%"; } }