diff --git a/assets/js/script.js b/assets/js/script.js index 9a600cbb86dc04d75c3025a0daf320af1096db49..0b337c77b3e1177d7c15e7d503a8688e896c0242 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -1,45 +1,46 @@ -const following_bar = document.querySelector(".following.bar"); -const update_top_bar = function () { - following_bar.classList.toggle("qd", window.scrollY !== 0); -}; +document.addEventListener("load", () => { + const following_bar = document.querySelector(".following.bar"); + const update_top_bar = function () { + following_bar.classList.toggle("qd", window.scrollY !== 0); + }; -if (document.body.classList.contains("index")) { - document.addEventListener("scroll", update_top_bar); - update_top_bar(); -} + if (document.body.classList.contains("index")) { + document.addEventListener("scroll", update_top_bar); + update_top_bar(); + } -function preloadImage(element) { - element.src = element.dataset["src"]; - element.srcset = element.dataset["srcset"]; - element.addEventListener("load", () => { - element.parentElement.classList.add("loaded"); - }); - delete element.dataset["src"]; - delete element.dataset["srcset"]; -} + function preloadImage (element) { + element.src = element.dataset[ "src" ]; + element.srcset = element.dataset[ "srcset" ]; + element.addEventListener("load", () => { + element.parentElement.classList.add("loaded"); + }); + delete element.dataset[ "src" ]; + delete element.dataset[ "srcset" ]; + } -function onIntersection(entries) { - // Loop through the entries - entries.forEach(entry => { - // Are we in viewport? - if (entry.intersectionRatio > 0) { - // Stop watching and load the image - observer.unobserve(entry.target); - preloadImage(entry.target); - } - }); -} + function onIntersection (entries) { + // Loop through the entries + entries.forEach(entry => { + // Are we in viewport? + if (entry.intersectionRatio > 0) { + // Stop watching and load the image + observer.unobserve(entry.target); + preloadImage(entry.target); + } + }); + } // Get all of the images that are marked up to lazy load -const images = document.querySelectorAll('img[data-src]'); -const config = { - // If the image gets within 50px in the Y axis, start the download. - rootMargin: '400px 0px', - threshold: 0.01 -}; + const images = document.querySelectorAll('img[data-src]'); + const config = { + // If the image gets within 50px in the Y axis, start the download. + rootMargin: '400px 0px', threshold: 0.01 + }; // The observer for the images on the page -let observer = new IntersectionObserver(onIntersection, config); -images.forEach(image => { - observer.observe(image); + let observer = new IntersectionObserver(onIntersection, config); + images.forEach(image => { + observer.observe(image); + }); }); \ No newline at end of file diff --git a/index.html b/index.html index af26d8339956b60dcf2155167ce292252747facd..9df98be01c006e61939544b090c58352dcd30f09 100644 --- a/index.html +++ b/index.html @@ -103,48 +103,49 @@ little bit of the UI to your liking, you can truly customize QuasselDroid however you’d like.</p><p>Special themes for every situation – be it AMOLED displays or holidays – are available, and improve your battery life or just look fancy.</p></div><div class="nine wide column"><div class="ui one doubling cards"><div class="card"><div class="image"><div class="responsive container"><div class="responsive placeholder" style="padding-bottom: 62.64855687606112%; background-image: url(/assets/images/themes@thumb.jpg);"><noscript><img src="/assets/images/themes@1180.png 1180w" sizes="(max-width: 767px) calc(100vw + 1px), (max-width: 991px) 364px, (max-width: 1199px) 475px, 591px" srcset="/assets/images/themes@363.png 363w, /assets/images/themes@474.png 474w, /assets/images/themes@590.png 590w, /assets/images/themes@726.png 726w, /assets/images/themes@948.png 948w, /assets/images/themes@1180.png 1180w"/></noscript><img data-src="/assets/images/themes@1180.png 1180w" sizes="(max-width: 767px) calc(100vw + 1px), (max-width: 991px) 364px, (max-width: 1199px) 475px, 591px" data-srcset="/assets/images/themes@363.png 363w, /assets/images/themes@474.png 474w, /assets/images/themes@590.png 590w, /assets/images/themes@726.png 726w, /assets/images/themes@948.png 948w, /assets/images/themes@1180.png 1180w"/></div></div></div></div></div></div></div><div class="ui divider"></div><div class="row centered"><div class="wide column"><div class="ui four doubling cards"><a class="card" href="/assets/images/#{id}.png"><div class="image"><div class="responsive container"><div class="responsive placeholder" style="padding-bottom: 177.7777777777778%; background-image: url(/assets/images/quassel_light@thumb.jpg);"><noscript><img src="/assets/images/quassel_light@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" srcset="/assets/images/quassel_light@220.png 220w, /assets/images/quassel_light@266.png 266w, /assets/images/quassel_light@335.png 335w, /assets/images/quassel_light@352.png 352w, /assets/images/quassel_light@532.png 532w"/></noscript><img data-src="/assets/images/quassel_light@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" data-srcset="/assets/images/quassel_light@220.png 220w, /assets/images/quassel_light@266.png 266w, /assets/images/quassel_light@335.png 335w, /assets/images/quassel_light@352.png 352w, /assets/images/quassel_light@532.png 532w"/></div></div></div><div class="content"><div class="extra">Quassel Light</div></div></a><a class="card" href="/assets/images/#{id}.png"><div class="image"><div class="responsive container"><div class="responsive placeholder" style="padding-bottom: 177.7777777777778%; background-image: url(/assets/images/quassel_dark@thumb.jpg);"><noscript><img src="/assets/images/quassel_dark@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" srcset="/assets/images/quassel_dark@220.png 220w, /assets/images/quassel_dark@266.png 266w, /assets/images/quassel_dark@335.png 335w, /assets/images/quassel_dark@352.png 352w, /assets/images/quassel_dark@532.png 532w"/></noscript><img data-src="/assets/images/quassel_dark@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" data-srcset="/assets/images/quassel_dark@220.png 220w, /assets/images/quassel_dark@266.png 266w, /assets/images/quassel_dark@335.png 335w, /assets/images/quassel_dark@352.png 352w, /assets/images/quassel_dark@532.png 532w"/></div></div></div><div class="content"><div class="extra">Quassel Dark</div></div></a><a class="card" href="/assets/images/#{id}.png"><div class="image"><div class="responsive container"><div class="responsive placeholder" style="padding-bottom: 177.7777777777778%; background-image: url(/assets/images/solarized_light@thumb.jpg);"><noscript><img src="/assets/images/solarized_light@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" srcset="/assets/images/solarized_light@220.png 220w, /assets/images/solarized_light@266.png 266w, /assets/images/solarized_light@335.png 335w, /assets/images/solarized_light@352.png 352w, /assets/images/solarized_light@532.png 532w"/></noscript><img data-src="/assets/images/solarized_light@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" data-srcset="/assets/images/solarized_light@220.png 220w, /assets/images/solarized_light@266.png 266w, /assets/images/solarized_light@335.png 335w, /assets/images/solarized_light@352.png 352w, /assets/images/solarized_light@532.png 532w"/></div></div></div><div class="content"><div class="extra">Solarized Light</div></div></a><a class="card" href="/assets/images/#{id}.png"><div class="image"><div class="responsive container"><div class="responsive placeholder" style="padding-bottom: 177.7777777777778%; background-image: url(/assets/images/solarized_dark@thumb.jpg);"><noscript><img src="/assets/images/solarized_dark@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" srcset="/assets/images/solarized_dark@220.png 220w, /assets/images/solarized_dark@266.png 266w, /assets/images/solarized_dark@335.png 335w, /assets/images/solarized_dark@352.png 352w, /assets/images/solarized_dark@532.png 532w"/></noscript><img data-src="/assets/images/solarized_dark@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" data-srcset="/assets/images/solarized_dark@220.png 220w, /assets/images/solarized_dark@266.png 266w, /assets/images/solarized_dark@335.png 335w, /assets/images/solarized_dark@352.png 352w, /assets/images/solarized_dark@532.png 532w"/></div></div></div><div class="content"><div class="extra">Solarized Dark</div></div></a><a class="card" href="/assets/images/#{id}.png"><div class="image"><div class="responsive container"><div class="responsive placeholder" style="padding-bottom: 177.7777777777778%; background-image: url(/assets/images/gruvbox_light@thumb.jpg);"><noscript><img src="/assets/images/gruvbox_light@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" srcset="/assets/images/gruvbox_light@220.png 220w, /assets/images/gruvbox_light@266.png 266w, /assets/images/gruvbox_light@335.png 335w, /assets/images/gruvbox_light@352.png 352w, /assets/images/gruvbox_light@532.png 532w"/></noscript><img data-src="/assets/images/gruvbox_light@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" data-srcset="/assets/images/gruvbox_light@220.png 220w, /assets/images/gruvbox_light@266.png 266w, /assets/images/gruvbox_light@335.png 335w, /assets/images/gruvbox_light@352.png 352w, /assets/images/gruvbox_light@532.png 532w"/></div></div></div><div class="content"><div class="extra">Gruvbox Light</div></div></a><a class="card" href="/assets/images/#{id}.png"><div class="image"><div class="responsive container"><div class="responsive placeholder" style="padding-bottom: 177.7777777777778%; background-image: url(/assets/images/gruvbox_dark@thumb.jpg);"><noscript><img src="/assets/images/gruvbox_dark@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" srcset="/assets/images/gruvbox_dark@220.png 220w, /assets/images/gruvbox_dark@266.png 266w, /assets/images/gruvbox_dark@335.png 335w, /assets/images/gruvbox_dark@352.png 352w, /assets/images/gruvbox_dark@532.png 532w"/></noscript><img data-src="/assets/images/gruvbox_dark@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" data-srcset="/assets/images/gruvbox_dark@220.png 220w, /assets/images/gruvbox_dark@266.png 266w, /assets/images/gruvbox_dark@335.png 335w, /assets/images/gruvbox_dark@352.png 352w, /assets/images/gruvbox_dark@532.png 532w"/></div></div></div><div class="content"><div class="extra">Gruvbox Dark</div></div></a><a class="card" href="/assets/images/#{id}.png"><div class="image"><div class="responsive container"><div class="responsive placeholder" style="padding-bottom: 177.7777777777778%; background-image: url(/assets/images/amoled@thumb.jpg);"><noscript><img src="/assets/images/amoled@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" srcset="/assets/images/amoled@220.png 220w, /assets/images/amoled@266.png 266w, /assets/images/amoled@335.png 335w, /assets/images/amoled@352.png 352w, /assets/images/amoled@532.png 532w"/></noscript><img data-src="/assets/images/amoled@266.png" sizes="(max-width: 767px) calc(50vw - 2em + 1px), (max-width: 991px) 336px, (max-width: 1199px) 221px, 267px" data-srcset="/assets/images/amoled@220.png 220w, /assets/images/amoled@266.png 266w, /assets/images/amoled@335.png 335w, /assets/images/amoled@352.png 352w, /assets/images/amoled@532.png 532w"/></div></div></div><div class="content"><div class="extra">AMOLED</div></div></a></div></div></div></div></div></div><div class="ui black inverted vertical footer segment"><div class="ui center aligned container"><div class="ui stackable inverted grid"><div class="three wide column"><h4 class="ui inverted header">Community</h4><div class="ui inverted link list"><a class="item" href="https://www.transifex.com/quasseldroid/quasseldroid/">Help Translate</a><a class="item" href="https://github.com/sandsmark/quasseldroid/issues/">Submit an Issue</a><a class="item" href="irc://chat.freenode.org/#quasseldroid">Join our Chat</a><a class="item" href="/docs/">Documentation</a><a class="item" href="/privacy-policy/">Privacy Policy</a></div></div><div class="three wide column"><h4 class="ui inverted header">Discover More</h4><div class="ui inverted link list"><a class="item" href="https://quassel-irc.org/">Quassel</a><a class="item" href="https://github.com/magne4000/quassel-webserver/">quassel-webserver</a><a class="item" href="https://github.com/phhusson/quassel-irssi">quassel-irssi</a><a class="item" href="https://woboq.com/iquassel.html">iQuassel</a></div></div></div><div class="ui inverted section divider"></div><img class="ui centered mini image" src="/assets/images/icon.svg"><div class="ui horizontal inverted small divided link list"><a class="item" href="https://github.com/sandsmark/QuasselDroid">Free & Open Source -</a></div></div></div></div><script src="/assets/js/intersectionobserver.min.js"></script><script>const following_bar = document.querySelector(".following.bar"); -const update_top_bar = function () { - following_bar.classList.toggle("qd", window.scrollY !== 0); -}; +</a></div></div></div></div><script src="/assets/js/intersectionobserver.min.js"></script><script>document.addEventListener("load", () => { + const following_bar = document.querySelector(".following.bar"); + const update_top_bar = function () { + following_bar.classList.toggle("qd", window.scrollY !== 0); + }; -if (document.body.classList.contains("index")) { - document.addEventListener("scroll", update_top_bar); - update_top_bar(); -} + if (document.body.classList.contains("index")) { + document.addEventListener("scroll", update_top_bar); + update_top_bar(); + } -function preloadImage(element) { - element.src = element.dataset["src"]; - element.srcset = element.dataset["srcset"]; - element.addEventListener("load", () => { - element.parentElement.classList.add("loaded"); - }); - delete element.dataset["src"]; - delete element.dataset["srcset"]; -} + function preloadImage (element) { + element.src = element.dataset[ "src" ]; + element.srcset = element.dataset[ "srcset" ]; + element.addEventListener("load", () => { + element.parentElement.classList.add("loaded"); + }); + delete element.dataset[ "src" ]; + delete element.dataset[ "srcset" ]; + } -function onIntersection(entries) { - // Loop through the entries - entries.forEach(entry => { - // Are we in viewport? - if (entry.intersectionRatio > 0) { - // Stop watching and load the image - observer.unobserve(entry.target); - preloadImage(entry.target); - } - }); -} + function onIntersection (entries) { + // Loop through the entries + entries.forEach(entry => { + // Are we in viewport? + if (entry.intersectionRatio > 0) { + // Stop watching and load the image + observer.unobserve(entry.target); + preloadImage(entry.target); + } + }); + } // Get all of the images that are marked up to lazy load -const images = document.querySelectorAll('img[data-src]'); -const config = { - // If the image gets within 50px in the Y axis, start the download. - rootMargin: '400px 0px', - threshold: 0.01 -}; + const images = document.querySelectorAll('img[data-src]'); + const config = { + // If the image gets within 50px in the Y axis, start the download. + rootMargin: '400px 0px', threshold: 0.01 + }; // The observer for the images on the page -let observer = new IntersectionObserver(onIntersection, config); -images.forEach(image => { - observer.observe(image); + let observer = new IntersectionObserver(onIntersection, config); + images.forEach(image => { + observer.observe(image); + }); });</script></body></html> \ No newline at end of file diff --git a/privacy-policy/index.html b/privacy-policy/index.html index a74dbaa094df6a6f69a25eece94321ba9af62776..7c4d94c0a6d2d41310268374144062d719cddf66 100644 --- a/privacy-policy/index.html +++ b/privacy-policy/index.html @@ -99,48 +99,49 @@ server, and cannot be policed by us. </p><h3 class="ui header">Further Questions </h3><p>For further questions regarding our privacy policy, please contact <a href="mailto:support@kuschku.de">support@kuschku.de</a>.</p></div></div></div></div></div><div class="ui black inverted vertical footer segment"><div class="ui center aligned container"><div class="ui stackable inverted grid"><div class="three wide column"><h4 class="ui inverted header">Community</h4><div class="ui inverted link list"><a class="item" href="https://www.transifex.com/quasseldroid/quasseldroid/">Help Translate</a><a class="item" href="https://github.com/sandsmark/quasseldroid/issues/">Submit an Issue</a><a class="item" href="irc://chat.freenode.org/#quasseldroid">Join our Chat</a><a class="item" href="/docs/">Documentation</a><a class="item" href="/privacy-policy/">Privacy Policy</a></div></div><div class="three wide column"><h4 class="ui inverted header">Discover More</h4><div class="ui inverted link list"><a class="item" href="https://quassel-irc.org/">Quassel</a><a class="item" href="https://github.com/magne4000/quassel-webserver/">quassel-webserver</a><a class="item" href="https://github.com/phhusson/quassel-irssi">quassel-irssi</a><a class="item" href="https://woboq.com/iquassel.html">iQuassel</a></div></div></div><div class="ui inverted section divider"></div><img class="ui centered mini image" src="/assets/images/icon.svg"><div class="ui horizontal inverted small divided link list"><a class="item" href="https://github.com/sandsmark/QuasselDroid">Free & Open Source -</a></div></div></div></div><script src="/assets/js/intersectionobserver.min.js"></script><script>const following_bar = document.querySelector(".following.bar"); -const update_top_bar = function () { - following_bar.classList.toggle("qd", window.scrollY !== 0); -}; +</a></div></div></div></div><script src="/assets/js/intersectionobserver.min.js"></script><script>document.addEventListener("load", () => { + const following_bar = document.querySelector(".following.bar"); + const update_top_bar = function () { + following_bar.classList.toggle("qd", window.scrollY !== 0); + }; -if (document.body.classList.contains("index")) { - document.addEventListener("scroll", update_top_bar); - update_top_bar(); -} + if (document.body.classList.contains("index")) { + document.addEventListener("scroll", update_top_bar); + update_top_bar(); + } -function preloadImage(element) { - element.src = element.dataset["src"]; - element.srcset = element.dataset["srcset"]; - element.addEventListener("load", () => { - element.parentElement.classList.add("loaded"); - }); - delete element.dataset["src"]; - delete element.dataset["srcset"]; -} + function preloadImage (element) { + element.src = element.dataset[ "src" ]; + element.srcset = element.dataset[ "srcset" ]; + element.addEventListener("load", () => { + element.parentElement.classList.add("loaded"); + }); + delete element.dataset[ "src" ]; + delete element.dataset[ "srcset" ]; + } -function onIntersection(entries) { - // Loop through the entries - entries.forEach(entry => { - // Are we in viewport? - if (entry.intersectionRatio > 0) { - // Stop watching and load the image - observer.unobserve(entry.target); - preloadImage(entry.target); - } - }); -} + function onIntersection (entries) { + // Loop through the entries + entries.forEach(entry => { + // Are we in viewport? + if (entry.intersectionRatio > 0) { + // Stop watching and load the image + observer.unobserve(entry.target); + preloadImage(entry.target); + } + }); + } // Get all of the images that are marked up to lazy load -const images = document.querySelectorAll('img[data-src]'); -const config = { - // If the image gets within 50px in the Y axis, start the download. - rootMargin: '400px 0px', - threshold: 0.01 -}; + const images = document.querySelectorAll('img[data-src]'); + const config = { + // If the image gets within 50px in the Y axis, start the download. + rootMargin: '400px 0px', threshold: 0.01 + }; // The observer for the images on the page -let observer = new IntersectionObserver(onIntersection, config); -images.forEach(image => { - observer.observe(image); + let observer = new IntersectionObserver(onIntersection, config); + images.forEach(image => { + observer.observe(image); + }); });</script></body></html> \ No newline at end of file diff --git a/releases/index.html b/releases/index.html index 42e13fbfb9eaabe68478e98222731426c2cbbb3a..d90db3cab0218538c8bef100a6689db2e31bc2ba 100644 --- a/releases/index.html +++ b/releases/index.html @@ -95,48 +95,49 @@ <br> Alpha versions are available <a href="https://s3.kuschku.de/minio/releases/quasseldroid-ng/">here</a>. </p></div></div><div class="row centered"><div class="wide column"><div class="ui four doubling cards"><div class="card"><a href="https://play.google.com/store/apps/details?id=com.iskrembilen.quasseldroid"><img src="/assets/images/badge_play.svg"></a></div><div class="card"><a href="https://f-droid.org/packages/com.iskrembilen.quasseldroid/"><img src="/assets/images/badge_fdroid.svg"></a></div></div></div></div></div></div></div><div class="ui black inverted vertical footer segment"><div class="ui center aligned container"><div class="ui stackable inverted grid"><div class="three wide column"><h4 class="ui inverted header">Community</h4><div class="ui inverted link list"><a class="item" href="https://www.transifex.com/quasseldroid/quasseldroid/">Help Translate</a><a class="item" href="https://github.com/sandsmark/quasseldroid/issues/">Submit an Issue</a><a class="item" href="irc://chat.freenode.org/#quasseldroid">Join our Chat</a><a class="item" href="/docs/">Documentation</a><a class="item" href="/privacy-policy/">Privacy Policy</a></div></div><div class="three wide column"><h4 class="ui inverted header">Discover More</h4><div class="ui inverted link list"><a class="item" href="https://quassel-irc.org/">Quassel</a><a class="item" href="https://github.com/magne4000/quassel-webserver/">quassel-webserver</a><a class="item" href="https://github.com/phhusson/quassel-irssi">quassel-irssi</a><a class="item" href="https://woboq.com/iquassel.html">iQuassel</a></div></div></div><div class="ui inverted section divider"></div><img class="ui centered mini image" src="/assets/images/icon.svg"><div class="ui horizontal inverted small divided link list"><a class="item" href="https://github.com/sandsmark/QuasselDroid">Free & Open Source -</a></div></div></div></div><script src="/assets/js/intersectionobserver.min.js"></script><script>const following_bar = document.querySelector(".following.bar"); -const update_top_bar = function () { - following_bar.classList.toggle("qd", window.scrollY !== 0); -}; +</a></div></div></div></div><script src="/assets/js/intersectionobserver.min.js"></script><script>document.addEventListener("load", () => { + const following_bar = document.querySelector(".following.bar"); + const update_top_bar = function () { + following_bar.classList.toggle("qd", window.scrollY !== 0); + }; -if (document.body.classList.contains("index")) { - document.addEventListener("scroll", update_top_bar); - update_top_bar(); -} + if (document.body.classList.contains("index")) { + document.addEventListener("scroll", update_top_bar); + update_top_bar(); + } -function preloadImage(element) { - element.src = element.dataset["src"]; - element.srcset = element.dataset["srcset"]; - element.addEventListener("load", () => { - element.parentElement.classList.add("loaded"); - }); - delete element.dataset["src"]; - delete element.dataset["srcset"]; -} + function preloadImage (element) { + element.src = element.dataset[ "src" ]; + element.srcset = element.dataset[ "srcset" ]; + element.addEventListener("load", () => { + element.parentElement.classList.add("loaded"); + }); + delete element.dataset[ "src" ]; + delete element.dataset[ "srcset" ]; + } -function onIntersection(entries) { - // Loop through the entries - entries.forEach(entry => { - // Are we in viewport? - if (entry.intersectionRatio > 0) { - // Stop watching and load the image - observer.unobserve(entry.target); - preloadImage(entry.target); - } - }); -} + function onIntersection (entries) { + // Loop through the entries + entries.forEach(entry => { + // Are we in viewport? + if (entry.intersectionRatio > 0) { + // Stop watching and load the image + observer.unobserve(entry.target); + preloadImage(entry.target); + } + }); + } // Get all of the images that are marked up to lazy load -const images = document.querySelectorAll('img[data-src]'); -const config = { - // If the image gets within 50px in the Y axis, start the download. - rootMargin: '400px 0px', - threshold: 0.01 -}; + const images = document.querySelectorAll('img[data-src]'); + const config = { + // If the image gets within 50px in the Y axis, start the download. + rootMargin: '400px 0px', threshold: 0.01 + }; // The observer for the images on the page -let observer = new IntersectionObserver(onIntersection, config); -images.forEach(image => { - observer.observe(image); + let observer = new IntersectionObserver(onIntersection, config); + images.forEach(image => { + observer.observe(image); + }); });</script></body></html> \ No newline at end of file