Spaces:
Sleeping
Sleeping
Download script.js from nagasurendra/restaurant_app: direct link, hf CLI and curl.
- Browser
- Download file 864 Bytes
-
https://huggingface.co/spaces/nagasurendra/restaurant_app/resolve/main/script.js
- Command line
-
hf download hf://spaces/nagasurendra/restaurant_app/script.js
-
curl -L -o script.js https://huggingface.co/spaces/nagasurendra/restaurant_app/resolve/main/script.js
864 Bytes
| ffunction navigateToItem(item) { | |
| localStorage.setItem("selectedItem", item); | |
| window.location.href = "item_page.html"; | |
| } | |
| window.onload = function() { | |
| const selectedItem = localStorage.getItem("selectedItem"); | |
| if (selectedItem) { | |
| document.getElementById("selected-item").innerText = `Selected: ${selectedItem}`; | |
| document.getElementById("suggestions").innerHTML = ` | |
| <div class="item-card">Paneer Butter Masala <button>Add</button></div> | |
| <div class="item-card">Garlic Naan <button>Add</button></div> | |
| `; | |
| } | |
| }; | |
| function goToSummary() { | |
| const customInput = document.getElementById("custom-input").value; | |
| const summary = `Item: ${localStorage.getItem("selectedItem")}, Custom: ${customInput}`; | |
| localStorage.setItem("orderSummary", summary); | |
| window.location.href = "summary_page.html"; | |
| } | |