Skip to content

Commit

Permalink
wb this
Browse files Browse the repository at this point in the history
  • Loading branch information
FallBackITA27 committed Apr 11, 2024
1 parent b49978c commit 9a06485
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions mkwpp-parser/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,7 @@ function resetOutput() {
document.getElementById("output").innerHTML = "";
}

document.addEventListener("DOMContentLoaded", async function() {
fetch("https://www.mariokart64.com/mkw/profile.php").then(r=>r.text()).then(r=>{
let profileDocument = new DOMParser().parseFromString(r);
let playerList = profileDocument.getElementsByClassName("playerslist")[0]
console.log(playerList);
});
});

document.getElementById("readInput").addEventListener("click", function() {
async function parseData() {
let parserData = document.getElementById("inputTextArea").value.split("\n").filter(r=>r !== "");
let currentSubmission = {skip:true};
let skipToNextSubmission = false;
Expand Down Expand Up @@ -180,6 +172,16 @@ document.getElementById("readInput").addEventListener("click", function() {
data.submissions.times.push(handleTime(data,track,nosc,flap));
}
data.submissions.push(currentSubmission);
}

document.addEventListener("DOMContentLoaded", async function() {
document.getElementById("readInput").addEventListener("click", parseData);

// fetch("https://www.mariokart64.com/mkw/profile.php").then(r=>r.text()).then(r=>{
// let profileDocument = new DOMParser().parseFromString(r);
// let playerList = profileDocument.getElementsByClassName("playerslist")[0]
// console.log(playerList);
// });
});

function handleTime(data, track, nosc, flap) {
Expand Down

0 comments on commit 9a06485

Please sign in to comment.