diff --git a/assets/js/dev/common.js b/assets/js/dev/common.js index 99eae745..df33c2f3 100644 --- a/assets/js/dev/common.js +++ b/assets/js/dev/common.js @@ -129,6 +129,18 @@ function retry(fn, retries, err) { }); } +function flip_lazy_images() { + const sources = document.querySelectorAll('source.picturelazyload'); + sources.forEach(function(lazyEl) { + lazyEl.setAttribute("srcset", lazyEl.getAttribute("data-srcset")); + }); + + const imgs = document.querySelectorAll('img.lazyload'); + imgs.forEach(function(lazyEl) { + lazyEl.setAttribute("src", lazyEl.getAttribute("data-src")); + //lazyEl.setAttribute("srcset", lazyEl.getAttribute("data-srcset")); //can't do this because the webp shim can't handle it + }); +} $(document).ready(function() { $("#lang").mouseenter(function() { diff --git a/hitomi-dev.html.ver b/hitomi-dev.html.ver index c7f4d9de..1f06e5c5 100644 --- a/hitomi-dev.html.ver +++ b/hitomi-dev.html.ver @@ -1 +1 @@ -0.0.6-DEV01 +0.0.6-DEV02