initial commit

Signed-off-by: Martin Matous <m@matous.dev>
This commit is contained in:
Martin Matous 2022-03-31 20:59:21 +02:00
commit c4c0be94b0
Signed by: mmatous
GPG key ID: 8BED4CD352953224
7 changed files with 82 additions and 0 deletions

9
unf.js Normal file
View file

@ -0,0 +1,9 @@
const galleryElements = document.body.querySelectorAll('a.image.lightbox')
for (const elem of galleryElements) {
const thumb = elem.querySelector('img.thumbimage.lazyload')
const src = thumb.getAttribute('data-src')
const needle = '/latest'
const fullImage = src.substring(0, src.indexOf(needle) + needle.length)
elem.setAttribute('href', fullImage)
}