mirror of
https://git.rape.pet/ulith/amputoma-fe.git
synced 2025-02-07 13:52:39 +01:00
make rot.js check placeholders
This commit is contained in:
parent
0ad35c7ea0
commit
571e204f87
1 changed files with 8 additions and 2 deletions
|
@ -148,8 +148,14 @@
|
||||||
setMusic(rand(musicContainer.children).src);
|
setMusic(rand(musicContainer.children).src);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
setMusic(null);
|
const placeholderContainer = ptp.querySelector(".placeholder-container");
|
||||||
return false;
|
if (placeholderContainer && placeholderContainer.href.endsWith(".m4a")) {
|
||||||
|
setMusic(placeholderContainer.href);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
setMusic(null);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue