From 2f78f61ade2325b3b72a7d044a1500385e1c0ea9 Mon Sep 17 00:00:00 2001 From: kipukun Date: Sat, 27 May 2017 17:33:52 -0400 Subject: [PATCH] Fix mascot using wrong mp3 source --- public/js/main.js | 15 +++------------ templates/index.html | 12 +++++++----- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/public/js/main.js b/public/js/main.js index 9335f37b..4da174c4 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -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; } } diff --git a/templates/index.html b/templates/index.html index 271428de..5ff594cc 100755 --- a/templates/index.html +++ b/templates/index.html @@ -73,14 +73,16 @@ {{block "content" .}}{{call $.T "nothing_here"}}{{end}}
+ {{ if eq .Theme "tomorrow" }} + + {{ else }} - - -