From c5571fc359185e2cdccef80884068235ff77c1e1 Mon Sep 17 00:00:00 2001
From: IgorKurkov
Date: Sun, 26 Oct 2025 18:40:52 +0100
Subject: [PATCH] feat(epub.js): add font size selector with precised + and -
controls
---
cps/static/js/reading/epub.js | 6 +--
cps/templates/read.html | 83 ++++++++++++++++++++++++++++-------
2 files changed, 68 insertions(+), 21 deletions(-)
diff --git a/cps/static/js/reading/epub.js b/cps/static/js/reading/epub.js
index 8908a3263..21663a6ab 100644
--- a/cps/static/js/reading/epub.js
+++ b/cps/static/js/reading/epub.js
@@ -123,11 +123,7 @@ var reader;
reader.book.ready.then(() => {
const savedFontSize = localStorage.getItem("calibre.reader.fontSize");
if (savedFontSize) {
- const fontSizeFader = document.getElementById("fontSizeFader");
- if (fontSizeFader) {
- fontSizeFader.value = savedFontSize;
- reader.rendition.themes.fontSize(`${savedFontSize}%`);
- }
+ reader.rendition.themes.fontSize(`${savedFontSize}%`);
}
});
})();
diff --git a/cps/templates/read.html b/cps/templates/read.html
index 28f931935..f31b97141 100644
--- a/cps/templates/read.html
+++ b/cps/templates/read.html
@@ -158,16 +158,40 @@