make rot.js check placeholders

This commit is contained in:
uwaa 2025-01-23 02:32:51 +00:00
parent 0ad35c7ea0
commit 571e204f87

View file

@ -148,8 +148,14 @@
setMusic(rand(musicContainer.children).src);
return true;
} else {
setMusic(null);
return false;
const placeholderContainer = ptp.querySelector(".placeholder-container");
if (placeholderContainer && placeholderContainer.href.endsWith(".m4a")) {
setMusic(placeholderContainer.href);
return true;
} else {
setMusic(null);
return false;
}
}
});