Fix mascot using wrong mp3 source
Cette révision appartient à :
Parent
05701f1c38
révision
2f78f61ade
2 fichiers modifiés avec 10 ajouts et 17 suppressions
|
@ -32,13 +32,6 @@ function switchThemes(){
|
|||
}
|
||||
|
||||
|
||||
function changeTheme(opt) {
|
||||
theme = opt.value;
|
||||
localStorage.setItem("theme", theme);
|
||||
document.getElementById("theme").href = "/css/" + theme;
|
||||
console.log(theme);
|
||||
}
|
||||
|
||||
function toggleMascot(btn) {
|
||||
var state= btn.value;
|
||||
if (state == "hide") {
|
||||
|
@ -86,13 +79,11 @@ window.onload = function() {
|
|||
};
|
||||
|
||||
function playVoice() {
|
||||
switch (theme) {
|
||||
case "tomorrow.css":
|
||||
if (explosion) {
|
||||
explosion.play();
|
||||
break;
|
||||
default:
|
||||
}
|
||||
else {
|
||||
nyanpassu.volume = 0.5;
|
||||
nyanpassu.play();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,13 +73,15 @@
|
|||
{{block "content" .}}{{call $.T "nothing_here"}}{{end}}
|
||||
</div>
|
||||
<div id="mascot" class="hide-xs" onclick="playVoice();"></div>
|
||||
<audio id="nyanpassu" hidden preload="none">
|
||||
<source src="https://a.doko.moe/sewang.mp3" type="audio/mpeg">
|
||||
</audio>
|
||||
{{ if eq .Theme "tomorrow" }}
|
||||
<audio id="explosion" hidden preload="none">
|
||||
<source src="https://megumin.love/sounds/explosion.mp3" type="audio/mpeg">
|
||||
</audio>
|
||||
|
||||
{{ else }}
|
||||
<audio id="nyanpassu" hidden preload="none">
|
||||
<source src="https://a.doko.moe/sewang.mp3" type="audio/mpeg">
|
||||
</audio>
|
||||
{{end}}
|
||||
<div class="pagination">
|
||||
{{ genNav .Navigation .URL 15 }}
|
||||
</div>
|
||||
|
|
Référencer dans un nouveau ticket