diff --git a/static/js/devices.js b/static/js/devices.js index a2702bc..9c779fc 100644 --- a/static/js/devices.js +++ b/static/js/devices.js @@ -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();