From c703ee603af4f5269bbe48ecb5fa981efa140c3f Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Tue, 14 Aug 2018 15:26:15 +0200 Subject: [PATCH] fix hash location navigation --- js/main.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index febe554..784034f 100644 --- a/js/main.js +++ b/js/main.js @@ -392,5 +392,23 @@ $(function(){ }); // On app start, load top list - load_menu_state(); + if(window.location.hash) { + var hash = String(window.location.hash.replace('#','')); + switch(hash) { + case "top": + switch_menu(0); + break; + case "recent": + switch_menu(1); + break; + case "favorites": + switch_menu(2); + break; + default: + switch_menu(0); + break; + } + } else { + load_menu_state(); + }; });