better double page on reader

This commit is contained in:
2025-12-31 18:33:03 +01:00
parent e3c366836f
commit 991c58d91d
4 changed files with 124 additions and 12 deletions

View File

@@ -469,6 +469,18 @@ function createImageElement(page, index) {
}
};
img.onload = () => {
const ratio = img.naturalWidth / img.naturalHeight;
if (ratio > 1.3) {
const double = img.closest('.double-container');
if (double) {
double.replaceWith(img);
}
}
};
if (config.manga.mode === 'longstrip' && index > 0) {
img.classList.add('longstrip-fit');
} else {