1
Fork 0

show running text

This commit is contained in:
Jan-Erik Rediger 2024-06-03 20:55:29 +02:00
parent 37340eb816
commit 798d3629c7

View file

@ -105,14 +105,14 @@ window.getCode = function getCode() {
}
let statusElem = document.getElementById("status");
let indicatorElem = document.getElementById("htmx-indicator");
document.body.addEventListener('htmx:beforeRequest', (event) => {
let elem = document.getElementById("htmx-indicator");
elem.style.display = "inline";
indicatorElem.style.display = "inline";
statusElem.innerText = "Running…";
});
document.body.addEventListener('htmx:afterRequest', (event) => {
let elem = document.getElementById("htmx-indicator");
elem.style.display = "none";
indicatorElem.style.display = "none";
});
document.body.addEventListener('htmx:beforeSwap', (event) => {
let detail = event.detail;