mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-17 20:00:59 +02:00
Moved JS&CSS into appropriate files and changed observer to refresh button
This commit is contained in:
@ -2787,3 +2787,15 @@ let recentResolutionsValues = []
|
||||
heightField.value = temp
|
||||
})
|
||||
})()
|
||||
|
||||
/* Gallery JS */
|
||||
|
||||
function refreshGallery() {
|
||||
let container = document.getElementById("imagecontainer")
|
||||
container.remove()
|
||||
fetch('/all_images')
|
||||
.then(response => response.text())
|
||||
.then(text => new DOMParser().parseFromString(text, 'text/html'))
|
||||
.then(html_like => html_like.getElementsByTagName('div')[0])
|
||||
.then(div => document.getElementById("tab-content-gallery").appendChild(div))
|
||||
}
|
Reference in New Issue
Block a user