Beauty fix for URLs
This commit is contained in:
parent
ff17fb284f
commit
a3679d4f99
1 changed files with 9 additions and 1 deletions
|
@ -74,6 +74,9 @@ function showdevices() {
|
|||
$("#linkdevices").css("font-weight", "bold");
|
||||
$("#linkwifi").css("font-weight", "normal");
|
||||
$("#linkusers").css("font-weight", "normal");
|
||||
|
||||
window.history.pushState("", "", "/devices/");
|
||||
return false;
|
||||
};
|
||||
|
||||
function showwifi() {
|
||||
|
@ -84,6 +87,9 @@ function showwifi() {
|
|||
$("#linkdevices").css("font-weight", "normal");
|
||||
$("#linkwifi").css("font-weight", "bold");
|
||||
$("#linkusers").css("font-weight", "normal");
|
||||
|
||||
window.history.pushState("", "", "/wifi/");
|
||||
return false;
|
||||
};
|
||||
|
||||
function showusers() {
|
||||
|
@ -94,10 +100,12 @@ function showusers() {
|
|||
$("#linkdevices").css("font-weight", "normal");
|
||||
$("#linkwifi").css("font-weight", "normal");
|
||||
$("#linkusers").css("font-weight", "bold");
|
||||
|
||||
window.history.pushState("", "", "/users/");
|
||||
return false;
|
||||
};
|
||||
|
||||
var page = document.location.pathname.substring(1, document.location.pathname.lastIndexOf('/'));
|
||||
console.log(page)
|
||||
if (page == "users") showusers();
|
||||
else if (page == "wifi") showwifi();
|
||||
else showdevices();
|
||||
|
|
Loading…
Reference in a new issue