diff --git a/ui/easydiffusion/bucket_manager.py b/ui/easydiffusion/bucket_manager.py
index 9b7aeae1..e17a1c2a 100644
--- a/ui/easydiffusion/bucket_manager.py
+++ b/ui/easydiffusion/bucket_manager.py
@@ -116,7 +116,7 @@ def init():
try:
image: GalleryImage = db.query(GalleryImage).filter(GalleryImage.path == image_path).first()
head = "
"
- body = "
" + image.htmlForm() + ""
+ body = "
" + image.htmlForm() + ""
return Response(content="" + head + body + "", media_type="text/html")
except Exception as e:
print(e)
diff --git a/ui/media/js/main.js b/ui/media/js/main.js
index 5beb094d..72cd72e8 100644
--- a/ui/media/js/main.js
+++ b/ui/media/js/main.js
@@ -3088,6 +3088,15 @@ let recentResolutionsValues = []
function galleryImage(item) {
let div = document.createElement("div")
let img = document.createElement("img")
+ img.addEventListener("click", (event) => {
+ let w;
+ w = window.open("/single_image?image_path=" + item.path, "_blank")
+ w.addEventListener("DOMContentLoaded", () => {
+ w.document.getElementById("button").addEventListener("click", () => {
+ document.title = "hi"
+ })
+ })
+ })
img.src = "/image/" + item.path
img.dataset["request"] = JSON.stringify(item)