You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have my own js file "personal-scrobbles.js" which fetches data from last.fm and shows for example the play count in the playlist list next to each song.
It worked for over a year, when changing to a playlist that the event was fired. However, since December i guess it doesnt work anymore.
I noticed in the issues that you removed the appchange event because apparently noone was using it (#2696). Is there another way to execute a script when a new page in spotify opens?
๐ธ Screenshots
No response
The text was updated successfully, but these errors were encountered:
let previousPathname = Spicetify.Platform.History.location.pathname;
const checkHistoryChange = () => {
const currentPathname = Spicetify.Platform.History.location.pathname;
if (currentPathname !== previousPathname) {
previousPathname = currentPathname;
//do what I need to do when a history change is detected
}
};
// Check for history changes every 500 milliseconds
setInterval(checkHistoryChange, 500);
let previousPathname = Spicetify.Platform.History.location.pathname;
const checkHistoryChange = () => {
const currentPathname = Spicetify.Platform.History.location.pathname;
if (currentPathname !== previousPathname) {
previousPathname = currentPathname;
//do what I need to do when a history change is detected
}
};
// Check for history changes every 500 milliseconds
setInterval(checkHistoryChange, 500);
or just use Spicetify.Platform.History.listen(({ pathname }) => { console.log(pathname) })). There's no need for setInterval here...
๐ Have you checked Spicetify.app page for your issue?
๐ Is there already an issue for your problem?
โน Environment / Computer Info
๐ Description
I have my own js file "personal-scrobbles.js" which fetches data from last.fm and shows for example the play count in the playlist list next to each song.
It worked for over a year, when changing to a playlist that the event was fired. However, since December i guess it doesnt work anymore.
I noticed in the issues that you removed the appchange event because apparently noone was using it (#2696). Is there another way to execute a script when a new page in spotify opens?
๐ธ Screenshots
No response
The text was updated successfully, but these errors were encountered: