fix hash location navigation

This commit is contained in:
Jonas Heinrich 2018-08-14 15:26:15 +02:00
parent 77562b1734
commit c703ee603a

View File

@ -392,5 +392,23 @@ $(function(){
}); });
// On app start, load top list // 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();
};
}); });