summaryrefslogtreecommitdiffci
path: root/internal/lightgallery/html_renderer.go
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'internal/lightgallery/html_renderer.go')
-rw-r--r--internal/lightgallery/html_renderer.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/internal/lightgallery/html_renderer.go b/internal/lightgallery/html_renderer.go
index 21bd049..17a6f2b 100644
--- a/internal/lightgallery/html_renderer.go
+++ b/internal/lightgallery/html_renderer.go
@@ -119,14 +119,7 @@ function createLightGallery%s() {
galleryMap.set(inlineGallery, createLightGallery%s);
}
-document.addEventListener('htmx:afterRequest', (e) => {
- if (e.detail.xhr.status == 404 || e.detail.successful != true) {
- return console.error(e);
- }
- if (e.detail.target.id == 'general-page-body') {
- createLightGallery%s();
- }
-});
+document.addEventListener('DOMContentLoaded', createLightGallery%s);
</script>`, galleryID, galleryID, strings.Join(dynamicElements, ","), galleryID, galleryID))
}