diff --git a/lib/html/js/app.js b/lib/html/js/app.js
index 52631d6..3eef65a 100644
--- a/lib/html/js/app.js
+++ b/lib/html/js/app.js
@@ -3,7 +3,7 @@
document.body.hidden = false;
-var hash = window.location.hash.substr(1);
+var hash = window.location.hash.replace(/^[\/#?]+/, '');
var query = window.location.search;
function parseQuery(search) {