From 21be3673828070eb1d896b3bda0079c54b23ace3 Mon Sep 17 00:00:00 2001 From: Matteo Gheza Date: Tue, 29 Dec 2020 00:55:42 +0100 Subject: [PATCH] [skip-ci] refactoring --- server/resources/src/main.js | 12 ++++-------- server/templates/base.html | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/server/resources/src/main.js b/server/resources/src/main.js index e060a74..559d92f 100644 --- a/server/resources/src/main.js +++ b/server/resources/src/main.js @@ -188,16 +188,12 @@ function chat() { window.addEventListener('securitypolicyviolation',console.error.bind(console)); -/* Toggle between adding and removing the "responsive" class to topnav when the user clicks on the icon */ function menu() { - var x = document.getElementById("myTopnav"); - //var z = document.getElementById("logout"); - if (x.className === "topnav") { - x.className += " responsive"; - //z.className = " logout_sx"; + var topNavBar = document.getElementById("topNavBar"); + if (topNavBar.className === "topnav") { + topNavBar.className += " responsive"; } else { - x.className = "topnav"; - //z.className = " logout_dx"; + topNavBar.className = "topnav"; } } diff --git a/server/templates/base.html b/server/templates/base.html index 57d6fe5..278091f 100644 --- a/server/templates/base.html +++ b/server/templates/base.html @@ -53,7 +53,7 @@ {% block menu %} -
+