This commit is contained in:
Vinejar
2025-03-30 02:59:20 +03:00
commit 2184ad7171
6 changed files with 231 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
function changePage(select) {
const selectedImg = select.value;
const previewContainer = document.getElementById("previewContainer");
const imageBox = document.getElementById("imageBox");
const mangaImage = document.getElementById("mangaImage");
if (selectedImg === "preview") {
previewContainer.style.display = "block";
imageBox.style.display = "none";
} else {
previewContainer.style.display = "none";
mangaImage.src = selectedImg;
imageBox.style.display = "block";
}
}
function showImage(imgSrc) {
const drop = document.getElementById("drop");
drop.value = imgSrc;
changePage(drop);
// Прокрутка к изображению
document.getElementById("imageBox").scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
// Инициализация при загрузке
document.addEventListener('DOMContentLoaded', function() {
// Убедимся, что превью отображается по умолчанию
document.getElementById("previewContainer").style.display = "block";
document.getElementById("imageBox").style.display = "none";
});