OsuProfileScoresTimeGraph

Adds graphing for which hours scores were set at

< Feedback on OsuProfileScoresTimeGraph

Review: OK - script works, but has bugs

§
Posted: 2022-04-07
Edited: 2022-04-07

doesnt work with firefox, created a fix.

i made this function

function selfID() {
    let buttons = document.getElementsByClassName("simple-menu__item");

    for (let i = 0; i < buttons.length; i++) {
            if (buttons[i].href != null && buttons[i].href.includes("users")) {
                return  buttons[i].href.split("/").at(-1);
        }
    }
}

and then on line 154 instead of currentUser.id I call it. What it does is get all of the buttons and finds the one that is the "My Profile" button.

§
Posted: 2022-04-07

edit: the return needs to be parsed as an Int parseInt(buttons[i].href.split("/").at(-1)); i forgot i made the check == rather than === later in the code while debugging

§
Posted: 2024-01-16

Givo the goat, thank you!

Post reply

Sign in to post a reply.