edit the htmls

This commit is contained in:
Dilanka-H
2025-11-21 17:36:29 +07:00
parent 30a63f7433
commit fc5c7db221
10 changed files with 6684 additions and 64 deletions

View File

@@ -1,5 +1,13 @@
{{ block "script" .}}
<script>
function clickBackButton() {
console.log('Back button clicked', window.history.state);
if (window.history.state && window.history.state["htmx"]) {
window.history.back();
} else {
window.location.href = '/';
}
}
function setScatteredWordsVisibility() {
const scatteredWords = document.getElementById('scatteredWords');
if (!scatteredWords) return;
@@ -18,7 +26,8 @@
setScatteredWordsVisibility();
});
document.body.addEventListener('htmx:historyRestore', function () {
document.body.addEventListener('htmx:historyRestore', function (e) {
console.log('Restoring history state', e.detail);
setScatteredWordsVisibility();
});
});