OsuProfileScoresTimeGraph

Adds graphing for which hours scores were set at

< Отзив за OsuProfileScoresTimeGraph

Отзив: ОК - скриптът работи, но има бъгове

§
Публикуван на: 07.04.2022
Редактиран на: 07.04.2022

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.

§
Публикуван на: 07.04.2022

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

§
Публикуван на: 16.01.2024

Givo the goat, thank you!

Публикувайте отговор

Влезте, за да публикувате отговор.