maybe fix page switching?
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m19s

This commit is contained in:
Lee 2024-04-25 19:56:06 +01:00
parent f5b8aa82c7
commit 80331ba972

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name ScoreSaber Utils // @name ScoreSaber Utils
// @namespace https://ssu.fascinated.cc // @namespace https://ssu.fascinated.cc
// @version 1.0.1 // @version 1.0.2
// @description Useful additions to ScoreSaber! // @description Useful additions to ScoreSaber!
// @author Fascinated // @author Fascinated
// @match https://scoresaber.com/* // @match https://scoresaber.com/*
@ -112,6 +112,10 @@ async function loadPlayerData(path) {
loadPlayerData(); loadPlayerData();
// Watch for URL changes // Watch for URL changes
window.navigation.addEventListener("navigate", (event) => { document.onreadystatechange = () => {
loadPlayerData(event.destination.url); if (document.readyState === "complete") {
}); window.navigation.addEventListener("navigate", (event) => {
loadPlayerData(event.destination.url);
});
}
};