]> git.sesse.net Git - pr0n/commitdiff
Fix some flickering.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 6 Jul 2020 14:14:30 +0000 (16:14 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 6 Jul 2020 14:14:30 +0000 (16:14 +0200)
files/pr0n-fullscreen.js

index a8ad78a9d0296ea912ba8ffab9840a9e68f620fc..14b080d5d830766750c0c9ac69b14dba4f11beff 100644 (file)
@@ -133,7 +133,8 @@ function display_image(url, backend_width, backend_height, elem_id, offset, prel
 
                // Seemingly one needs to delay position_image(), or Firefox will set the initial
                // scroll offset completely off.
-               setTimeout(function() { position_image(img, backend_width, backend_height, offset, preload); }, 1);
+               img.style.display = 'none';
+               setTimeout(function() { position_image(img, backend_width, backend_height, offset, preload); img.style.display = null; }, 1);
        }
 }