Skip to content

Commit

Permalink
Merge pull request #111 from RPI-ITWS/changed-font-color--joshua
Browse files Browse the repository at this point in the history
fixing link
  • Loading branch information
JoshuaCollinsRPI authored Dec 6, 2024
2 parents 860b6de + cef0297 commit b5603c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Statistics/assets/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ document.getElementById('name').addEventListener('click', function() {

function linktopage(name){
const filteredname = name.trim().toLowerCase();
const Index = lowerplayers.findIndex(name => name.toLowerCase() === filteredname );
const Index = lowerplayers.findIndex(name => name.toLowerCase() === filteredname);

if (Index === -1){
return
}else{
const x = players[Index];
const key = playerid[x];
const nameParts = name.split(' ');
window.location.href = "https://winshare.eastus.cloudapp.azure.com/ITWS-2110-F24-WinShare/Player/Player.php?id="+key+"&name="+nameParts[0]+"%20"+nameParts[1];
const nameURL = encodeURIComponent(name);
window.location.href = `https://winshare.eastus.cloudapp.azure.com/ITWS-2110-F24-WinShare/Player/Player.php?id=${key}&name=${nameURL}`;
}
return;
};
Expand Down

0 comments on commit b5603c2

Please sign in to comment.