summaryrefslogtreecommitdiff
path: root/read.html
diff options
context:
space:
mode:
Diffstat (limited to 'read.html')
-rw-r--r--read.html15
1 files changed, 8 insertions, 7 deletions
diff --git a/read.html b/read.html
index eee1260..8244aa3 100644
--- a/read.html
+++ b/read.html
@@ -165,13 +165,14 @@
book.open(book_url);
- $.get("backend.php", { op: "getsettings" }, function(data) {
- console.log(data);
-
- book.setStyle("fontSize", data.fontSize + "px");
- book.setStyle("fontFamily", data.fontFamily);
- book.setStyle("lineHeight", data.lineHeight + "%");
- });
+ var settings = {
+ fontSize: localStorage['epube:fontSize'] ? localStorage['epube:fontSize'] : '16px',
+ fontFamily: localStorage['epube:fontFamily'] ? localStorage['epube:fontFamily'] : 'Georgia',
+ lineHeight: localStorage['epube:lineHeight'] ? localStorage['epube:lineHeight'] : '140%' };
+
+ book.setStyle("fontSize", settings.fontSize + "px");
+ book.setStyle("fontFamily", settings.fontFamily);
+ book.setStyle("lineHeight", settings.lineHeight + "%");
//styles: { fontSize: '24px', lineHeight: '130%', fontFamily: 'Georgia' }