Spaces:
Sleeping
Sleeping
Download static/js/script.js from Rahul23232/flask-mongo: direct link, hf CLI and curl.
- Browser
- Download file 816 Bytes
-
https://huggingface.co/spaces/Rahul23232/flask-mongo/resolve/main/static/js/script.js
- Command line
-
hf download hf://spaces/Rahul23232/flask-mongo/static/js/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Rahul23232/flask-mongo/resolve/main/static/js/script.js
816 Bytes
| function confirmDelete(taskId) { | |
| document.getElementById('deleteConfirmBtn').setAttribute('href', '/delete/' + taskId); | |
| var deleteModal = new bootstrap.Modal(document.getElementById('deleteModal')); | |
| deleteModal.show(); | |
| } | |
| // Dark Mode Toggle | |
| function toggleDarkMode() { | |
| document.body.classList.toggle("dark-mode"); | |
| localStorage.setItem("darkMode", document.body.classList.contains("dark-mode")); | |
| } | |
| // Load dark mode preference | |
| document.addEventListener("DOMContentLoaded", function() { | |
| if (localStorage.getItem("darkMode") === "true") { | |
| document.body.classList.add("dark-mode"); | |
| document.getElementById("darkModeToggle").checked = true; | |
| } | |
| }); |