From a0fdd7b968f10887d9fed6e187a974b2a4cba0be Mon Sep 17 00:00:00 2001 From: Janne Koschinski <janne@kuschku.de> Date: Mon, 5 Mar 2018 18:26:21 +0100 Subject: [PATCH] Improved script performance --- assets/js/script.js | 2 +- index.html | 2 +- privacy-policy/index.html | 2 +- releases/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/js/script.js b/assets/js/script.js index a40800c..08f277d 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -35,7 +35,7 @@ document.addEventListener("DOMContentLoaded", () => { 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 + rootMargin: '200px 0px', threshold: 0.01 }; // The observer for the images on the page diff --git a/index.html b/index.html index 237ffbf..c62bd8c 100644 --- a/index.html +++ b/index.html @@ -140,7 +140,7 @@ or just look fancy.</p></div><div class="nine wide column"><div class="ui one do 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 + rootMargin: '200px 0px', threshold: 0.01 }; // The observer for the images on the page diff --git a/privacy-policy/index.html b/privacy-policy/index.html index bb90df9..6a27750 100644 --- a/privacy-policy/index.html +++ b/privacy-policy/index.html @@ -136,7 +136,7 @@ server, and cannot be policed by us. 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 + rootMargin: '200px 0px', threshold: 0.01 }; // The observer for the images on the page diff --git a/releases/index.html b/releases/index.html index 7f9a8d9..27a00ad 100644 --- a/releases/index.html +++ b/releases/index.html @@ -132,7 +132,7 @@ Alpha versions are available <a href="https://s3.kuschku.de/minio/releases/quass 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 + rootMargin: '200px 0px', threshold: 0.01 }; // The observer for the images on the page -- GitLab