From 32a1ab4f3cff0dc25fbc4411a8e02c4042f70f4c Mon Sep 17 00:00:00 2001 From: pezcurrel Date: Sat, 28 Sep 2024 21:37:48 +0200 Subject: [PATCH] =?UTF-8?q?Made=20=E2=80=9Cprel()=E2=80=9D=20also=20load?= =?UTF-8?q?=20previous-previuos=20and=20next-next=20images?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pfaltgall | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/pfaltgall b/pfaltgall index c3c2205..581df87 100755 --- a/pfaltgall +++ b/pfaltgall @@ -413,30 +413,40 @@ function prel() { pages=Math.round(th/ph), sy=Math.round(md.scrollTop), page=Math.round(pages-(th-sy)/ph)+1, - img, - u; + img; //console.log(ph+" "+th+" "+pages+" "+sy+" "+page); if (page>1) {//current img=document.getElementById("img"+(page-2)); if (img.src==phimgurl) { - u=imgurls[page-2]; - img.src=u; + img.src=imgurls[page-2]; img.loading="eager"; } } if (page2) {//previous img=document.getElementById("img"+(page-3)); if (img.src==phimgurl) { - u=imgurls[page-3]; - img.src=u; + img.src=imgurls[page-3]; + img.loading="eager"; + } + } + if (page+13) {//previous-previous + img=document.getElementById("img"+(page-4)); + if (img.src==phimgurl) { + img.src=imgurls[page-4]; img.loading="eager"; } }