From d5e6fc31302614c7744077f10d49ed0347921a40 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 6 Jul 2020 16:14:30 +0200 Subject: [PATCH] Fix some flickering. --- files/pr0n-fullscreen.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/pr0n-fullscreen.js b/files/pr0n-fullscreen.js index a8ad78a..14b080d 100644 --- a/files/pr0n-fullscreen.js +++ b/files/pr0n-fullscreen.js @@ -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); } } -- 2.39.2