From 93b86ef80905b81c1dbc98d69f08cf16f9d94a53 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 16 Nov 2020 14:16:35 +0300 Subject: fix is-epube-app class being reset in Reader.applyTheme --- js/reader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/reader.js') diff --git a/js/reader.js b/js/reader.js index 769c4cc..cc823b5 100644 --- a/js/reader.js +++ b/js/reader.js @@ -27,8 +27,6 @@ const Reader = { if (typeof EpubeApp != "undefined") { EpubeApp.setPage("PAGE_READER"); - - $("body").addClass("is-epube-app"); } Reader.applyTheme(); @@ -791,6 +789,8 @@ const Reader = { .addClass("epube-reader theme-" + theme); if (typeof EpubeApp != "undefined") { + $("body").addClass("is-epube-app"); + window.setTimeout(function() { const bg_color = window.getComputedStyle(document.querySelector("body"), null) .getPropertyValue("background-color"); -- cgit v1.2.3