From e417662dce5cae2e95ef98ee38baa8f53a02b9d5 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Wed, 16 Apr 2014 15:17:31 -0400 Subject: mbleh --- www/js/menu.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'www/js/menu.js') diff --git a/www/js/menu.js b/www/js/menu.js index 93616db..5b646b9 100644 --- a/www/js/menu.js +++ b/www/js/menu.js @@ -5,8 +5,8 @@ html5ks.menu = { this.context(false); html5ks.api.stop("all"); html5ks.api.window("hide"); - html5ks.api.play("music", "music_menus"); - html5ks.api.show("url", "ui/main/bg-main.png"); + html5ks.api.play(['', "music"], {file: "music_menus", fadein: 5}); + html5ks.api.Show("url", "ui/main/bg-main.png"); this.elements.mainMenu.style.display = "block"; html5ks.store.status = "menu"; }, @@ -161,6 +161,15 @@ html5ks.menu = { console.error("unknown option type %s", option.type); } } + + document.getElementById("clear-persistent").addEventListener("click", function () { + if (delete localStorage.persistent) { + alert("clear succeeded, refreshing..."); + location.reload(); + } else { + alert("clear failed"); + } + }, false); }, init: function () { -- cgit v1.2.3-54-g00ecf