diff --git a/assets/js/dev/gallery.js b/assets/js/dev/gallery.js index a443f9e8..54722b53 100644 --- a/assets/js/dev/gallery.js +++ b/assets/js/dev/gallery.js @@ -22,7 +22,7 @@ async function get_gallery(galleryid) { const lang_list = Array.from(doc.querySelectorAll('#lang-list a'), elm => [elm.innerText, elm.getAttribute('href').slice(11, -5)]); - const cover = `https:${doc.querySelector('.cover img').getAttribute('src')}`; + const cover = doc.querySelector('.cover img').src; const title = doc.querySelector('.gallery h1 a').innerText; const artists = Array.from(doc.querySelectorAll('.gallery h2 a'), elm => elm.innerText); @@ -53,4 +53,4 @@ async function get_gallery(galleryid) { tags: tags, thumbnails: thumbnails }; -} \ No newline at end of file +} diff --git a/assets/js/dev/galleryblock.js b/assets/js/dev/galleryblock.js index 68f54657..a589ef7b 100644 --- a/assets/js/dev/galleryblock.js +++ b/assets/js/dev/galleryblock.js @@ -8,10 +8,10 @@ async function get_gallery_block(galleryid) { const title_elm = doc.querySelector('h1 > a'); - const gallery_url = title_elm.getAttribute('href'); + const gallery_url = title_elm.href; const title = title_elm.textContent; - const thumbnails = Array.from(doc.querySelectorAll('.dj-img-cont img'), elm => elm.getAttribute('data-src')); + const thumbnails = Array.from(doc.querySelectorAll('.dj-img-cont img'), elm => `https:${elm.getAttribute('data-src')}`); const artists = Array.from(doc.querySelectorAll('.artist-list a'), elm => elm.innerText); const series = Array.from(doc.querySelectorAll('a[href^="/series/"]'), elm => elm.innerText);