Remove unused JavaScript files: alerts.js, django-htmx.js, park-map.js, search.js, main.js, and photo-gallery.js

This commit is contained in:
pacnpal
2025-02-23 12:06:48 -05:00
parent 401449201c
commit 45948bcc80
17 changed files with 0 additions and 1003 deletions

View File

@@ -1,22 +0,0 @@
{
const data = document.currentScript.dataset;
const isDebug = data.debug === "True";
if (isDebug) {
document.addEventListener("htmx:beforeOnLoad", function (event) {
const xhr = event.detail.xhr;
if (xhr.status == 500 || xhr.status == 404) {
// Tell htmx to stop processing this response
event.stopPropagation();
document.children[0].innerHTML = xhr.response;
// Run Djangos inline script
// (1, eval) wtf - see https://stackoverflow.com/questions/9107240/1-evalthis-vs-evalthis-in-javascript
(1, eval)(document.scripts[0].innerText);
// Need to directly call Djangos onload function since browser wont
window.onload();
}
});
}
}