Skip to content

Commit

Permalink
Update overlay.js
Browse files Browse the repository at this point in the history
  • Loading branch information
haxgun authored Sep 15, 2024
1 parent 745d7f6 commit 6b3dba3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ const apiUrl = "https://api.henrikdev.xyz/valorant";

// Color Settings
const {
hdevApiKey,
textColor,
primaryColor,
bgColor,
progressRankColor,
progressRankBgColor,
} = {
hdevApiKey:
urlParams.get("hdevApiKey"),
textColor: urlParams.get("textColor").replace("#", ""),
primaryColor: urlParams.get("primaryColor").replace("#", ""),
bgColor: urlParams.get("bgColor").replace("#", ""),
Expand Down Expand Up @@ -70,7 +73,7 @@ async function main(nickname, tag) {
}

async function getPuuidWithRegion(nickname, tag) {
const response = await fetch(`${apiUrl}/v1/account/${nickname}/${tag}`);
const response = await fetch(`${apiUrl}/v1/account/${nickname}/${tag}?api_key=${hdevApiKey}`);
const data = await response.json();
return [data.data.puuid, data.data.region];
}
Expand Down

0 comments on commit 6b3dba3

Please sign in to comment.