From edc8dc145e584302f81a11ca87efb1fb9a3f8ae3 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 10 Aug 2024 15:40:03 +0300 Subject: fix(image-show)!: Removed feature Styling was already removed --- src/scripts/image-show.js | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 src/scripts/image-show.js (limited to 'src/scripts') diff --git a/src/scripts/image-show.js b/src/scripts/image-show.js deleted file mode 100644 index 8664ef4..0000000 --- a/src/scripts/image-show.js +++ /dev/null @@ -1,24 +0,0 @@ -let scrollPosition = 0; - -function clickToView() { - if (scrollPosition === 0) { - scrollPosition = window.scrollY; - window.scrollTo(0, 0); - } - - this.classList.toggle('clicked-image'); - document.body.classList.toggle('body-on-clicked-image'); - - if (!this.classList.contains('clicked-image')) { - window.scrollTo(0, scrollPosition); - scrollPosition = 0; - } -} - -const images = document.getElementsByTagName('img'); - -for (const image of images) { - if (image.alt !== '🔗' && !image.classList.contains('unzoomable')) { - image.onclick = clickToView; - } -} -- cgit v1.3.1-23-gd82d