summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--css/read.css8
-rw-r--r--js/app.js14
-rw-r--r--js/reader.js1
3 files changed, 18 insertions, 5 deletions
diff --git a/css/read.css b/css/read.css
index 2b8153e..fc1e392 100644
--- a/css/read.css
+++ b/css/read.css
@@ -163,10 +163,8 @@
background-color:rgba(0,0,0,0.1);
}
-body.is-epube-app .header {
- display : none ! important;
+body.is-epube-app .header .toolbar,
+body.is-epube-app .header a {
+ display : none;
}
-body.is-epube-app #reader {
- top : 0px;
-} \ No newline at end of file
diff --git a/js/app.js b/js/app.js
index 585726a..fcc8bfe 100644
--- a/js/app.js
+++ b/js/app.js
@@ -51,6 +51,7 @@ const App = {
}
App.initNightMode();
+ App.initOfflineEvents();
if ('serviceWorker' in navigator) {
navigator.serviceWorker
@@ -199,7 +200,19 @@ const App = {
});
}
},
+ initOfflineEvents: function() {
+ if (typeof EpubeApp != "undefined") {
+ $(window).on('online', function() {
+ EpubeApp.setOffline(false);
+ });
+
+ $(window).on('offline', function() {
+ EpubeApp.setOffline(true);
+ });
+ EpubeApp.setOffline(!navigator.onLine);
+ }
+ },
initNightMode: function() {
if (window.matchMedia) {
const mql = window.matchMedia('(prefers-color-scheme: dark)');
@@ -227,6 +240,7 @@ const App = {
}
App.initNightMode();
+ App.initOfflineEvents();
if ('serviceWorker' in navigator) {
navigator.serviceWorker
diff --git a/js/reader.js b/js/reader.js
index 2688d83..5758a80 100644
--- a/js/reader.js
+++ b/js/reader.js
@@ -639,6 +639,7 @@ const Reader = {
c.css("font-size", fontSize);
c.css("font-family", "'" + fontFamily + "'");
c.css("line-height", lineHeight);
+ c.css("text-align", "justify");
});
Reader.applyTheme();