From f1bcba25bc9a255f17574e0218c4bf6091395fe8 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 18 Nov 2023 10:19:13 +0100 Subject: [PATCH] fix: remove viewer --- header.php | 4 ---- js/viewer.js | 28 +++++++--------------------- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/header.php b/header.php index 9ffc7ce..bb4d173 100644 --- a/header.php +++ b/header.php @@ -16,13 +16,9 @@ " rel="stylesheet"/> - " rel="stylesheet"/> - - - diff --git a/js/viewer.js b/js/viewer.js index 1c38f90..3d2f558 100644 --- a/js/viewer.js +++ b/js/viewer.js @@ -1,21 +1,7 @@ -const viewer = new Viewer(document.getElementById('myarticle'), { - inline: false, - navbar: true, - title: false, - toolbar: { - zoomIn: 4, - zoomOut: 4, - oneToOne: 4, - reset: 4, - prev: 1, - play: { - show: 0, - size: 'large', - }, - next: 1, - rotateLeft: 0, - rotateRight: 0, - flipHorizontal: 0, - flipVertical: 0, - }, -}); \ No newline at end of file +const articleImg = document.querySelectorAll('#myarticle img') + +for (let i = 0; i < articleImg.length; i++) { + articleImg[i].addEventListener("click", function () { + window.open(articleImg[i].src, "_blank"); + }); +} \ No newline at end of file