fix hash location navigation
This commit is contained in:
parent
77562b1734
commit
c703ee603a
20
js/main.js
20
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();
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user