Moved JS&CSS into appropriate files and changed observer to refresh button

This commit is contained in:
ManInDark
2023-08-06 22:06:16 +02:00
parent 3cc951cdaa
commit 73a6e6c737
3 changed files with 30 additions and 31 deletions

View File

@ -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))
}