From 0355d1e0dbaec9e185fc9e752ba99683393bd2c3 Mon Sep 17 00:00:00 2001 From: Christian Aribaud Date: Sat, 15 Apr 2023 17:38:46 +0200 Subject: [PATCH] Make images loading less jarring --- comic_reader.css | 2 +- comic_reader.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/comic_reader.css b/comic_reader.css index 69bdbd1..5e3f879 100644 --- a/comic_reader.css +++ b/comic_reader.css @@ -14,7 +14,7 @@ #reader-pages > img { display: inline-block; opacity:0; - transition: all 1.5s ease; + transition: all 1s cubic-bezier(.9,.03,.69,.22); /* ease-in quartic */ flex-shrink: 0; } diff --git a/comic_reader.js b/comic_reader.js index f58ca20..0c04c13 100644 --- a/comic_reader.js +++ b/comic_reader.js @@ -103,7 +103,10 @@ function initReader(){ } READER_PAGES.style.display = "flex" - READER_PAGES.hidden = false + setTimeout(() => { + READER_PAGES.hidden = false + }, "300") + }