1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-26 21:07:40 +00:00

Merge remote-tracking branch 'comic/comic_viewer_changes' into master

This commit is contained in:
Ozzie Isaacs
2021-05-16 13:19:28 +02:00
3 changed files with 42 additions and 1 deletions

View File

@@ -69,7 +69,9 @@ var settings = {
rotateTimes: 0,
fitMode: kthoom.Key.B,
theme: "light",
direction: 0 // 0 = Left to Right, 1 = Right to Left
direction: 0, // 0 = Left to Right, 1 = Right to Left
nextPage: 0, // 0 = Reset to Top, 1 = Remember Position
scrollbar: 1 // 0 = Hide Scrollbar, 1 = Show Scrollbar
};
kthoom.saveSettings = function() {
@@ -282,6 +284,7 @@ function updatePage() {
}
$("body").toggleClass("dark-theme", settings.theme === "dark");
$("#mainContent").toggleClass("disabled-scrollbar", settings.scrollbar === 0);
kthoom.setSettings();
kthoom.saveSettings();
@@ -439,6 +442,9 @@ function showPrevPage() {
currentImage++;
} else {
updatePage();
if (settings.nextPage === 0) {
$("#mainContent").scrollTop(0);
}
}
}
@@ -449,6 +455,9 @@ function showNextPage() {
currentImage--;
} else {
updatePage();
if (settings.nextPage === 0) {
$("#mainContent").scrollTop(0);
}
}
}
@@ -650,6 +659,9 @@ function init(filename) {
$("#thumbnails").on("click", "a", function() {
currentImage = $(this).data("page") - 1;
updatePage();
if (settings.nextPage === 0) {
$("#mainContent").scrollTop(0);
}
});
// Fullscreen mode