better double page on reader
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -613,3 +613,13 @@ input[type="color"] {
|
||||
object-fit: contain !important;
|
||||
}
|
||||
}
|
||||
|
||||
.double-container.break-double {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.double-container.break-double img {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user