diff --git a/public/javascripts/menu.js b/public/javascripts/menu.js index 839929f..b2ca8de 100644 --- a/public/javascripts/menu.js +++ b/public/javascripts/menu.js @@ -1,19 +1,11 @@ import {alert, confirm} from "./popups.js"; + const socket = io(); -const dish = document.querySelector("#dish ul"); -const ingredient = document.querySelector("#ingredient ul"); -const sauce = document.querySelector("#sauce ul"); -const drink = document.querySelector("#drink ul"); -const dessert = document.querySelector("#dessert ul"); let db = {dish: {}, ingredient: {}, sauce: {}, drink: {}, dessert: {}}; -if (window.location.href.endsWith("#popup")) - window.location.href = window.location.href.replace("#popup", "#"); - - -function popup(ob, el) { +function editPopup(ob, el) { document.querySelector("body").insertAdjacentHTML("afterbegin", `