summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-11-16 14:20:08 +0300
committerAndrew Dolgov <[email protected]>2020-11-16 14:20:08 +0300
commit521a040b7a460688675f1d5c0eac46bfe1a24883 (patch)
treeb24f563740919c0581cd586ed09ae4527c4e9a1e /js
parent93b86ef80905b81c1dbc98d69f08cf16f9d94a53 (diff)
fix is-epube-app class being reset in Reader.applyTheme (2)
Diffstat (limited to 'js')
-rw-r--r--js/reader.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/js/reader.js b/js/reader.js
index cc823b5..6227fbc 100644
--- a/js/reader.js
+++ b/js/reader.js
@@ -214,7 +214,7 @@ const Reader = {
if (!theme) theme = 'default';
$(contents.document).find("body")
- .attr("class", "")
+ .attr("class", typeof EpubeApp != "undefined" ? "is-epube-app" : "")
.addClass("theme-" + theme);
});
@@ -785,11 +785,10 @@ const Reader = {
console.log('setting main UI theme', theme);
$("body")
- .attr("class", "")
+ .attr("class", typeof EpubeApp != "undefined" ? "is-epube-app" : "")
.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)
@@ -809,7 +808,7 @@ const Reader = {
console.log('applying rendition theme', theme, 'to', c, c.document);
$(c.document).find("body")
- .attr("class", "")
+ .attr("class", typeof EpubeApp != "undefined" ? "is-epube-app" : "")
.addClass("theme-" + theme);
});