Greasy Fork is available in English.

UniteAPI ranked wr % indicator

Adds a ranked wr % to UniteAPI profiles.

اعتبارا من 17-11-2025. شاهد أحدث إصدار.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name UniteAPI ranked wr % indicator
// @namespace 
// @version 0.0
// @license MIT
// @description  Adds a ranked wr % to UniteAPI profiles.
// @match https://uniteapi.dev/p/*
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
let statsBox = document.querySelector(".sc-504963e2-2.btGQnE");
let statsBoxContent = statsBox.querySelectorAll("div");
for (let i = 0; i < statsBoxContent.length; i++) {
    console.log(`${i}: ${statsBoxContent[i].innerText}`);
}

console.log(statsBoxContent[3])

let playerName = document.querySelector(".sc-6d6ea15e-1.gpvunk").innerText;
let playerStats = document.querySelectorAll(".sc-6d6ea15e-1.sc-10fb34f9-1.SarYu.dzkbmM");
for (let i = 0; i < playerStats.length; i++) {
    console.log(`${i}: ${playerStats[i].innerText}`);
}
let totalBattles = parseFloat(playerStats[2].innerText)
let numOfWins = parseFloat(playerStats[3].innerText)
let rankedWr = numOfWins / totalBattles;
let finalWr = (rankedWr * 100).toFixed(2);
console.log(`${playerName}'s win rate is ${finalWr}%. They have ${totalBattles} ranked battles.`);
console.log(playerStats.length);

statsBoxContent[3].insertAdjacentHTML("afterend",`
    <div class="sc-10fb34f9-0 flAlGE">
        <p id="wrLabel" class="sc-6d6ea15e-3 hxGuyl">
            Ranked Win Rate %
        </p>
        <p id="wrColor" style="color:yellow !important;" class="sc-6d6ea15e-1 sc-10fb34f9-1 SarYu dzkbmM">
            ${finalWr}%
        </p>
    </div>
`);

let varWrColor = document.getElementById("wrColor")
let varWrLabel = document.getElementById("wrLabel")


varWrColor.style.setProperty("color", "#cef33dff", "important");
varWrLabel.style.setProperty("color", "#cef33dff", "important");
varWrLabel.style.setProperty("font-weight", "bold")