Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
Update hamburger menu show conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
dodaucy committed Nov 18, 2023
1 parent 8894e2b commit 1d8d6e8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions static/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,13 @@ function show_reload_popup(show, text) {


function show_hamburger_menu(show) {
// Prevent from double clicking
if (document.getElementById("hamburger-menu").style.display == "flex" && show) {
var popup = document.getElementById("hamburger-menu");
if (popup.style.display == "flex" && show || popup.style.display == "none" && !show || front_end_disabled) {
return;
}
// Show or hide background
document.getElementById("hamburger-menu-background").style.display = show ? "block" : "none";
// Show or hide hamburger menu with animation
var popup = document.getElementById("hamburger-menu");
var position = 0;
var timer = setInterval(function() {
popup.style.display = "flex";
Expand Down

0 comments on commit 1d8d6e8

Please sign in to comment.