From dc66b2db0f55498d4bdb0b6041771fcb8b0fa63c Mon Sep 17 00:00:00 2001 From: 20xd6 <20xd6@airmail.cc> Date: Tue, 26 Jul 2022 11:20:33 -0400 Subject: [PATCH] Remove depracated JS files for issue #7 The functions in these files have been merged into the main JS file for page formatting. --- common/js/font_size.js | 1 - common/js/gallery.js | 32 -------------------------------- 2 files changed, 33 deletions(-) delete mode 100644 common/js/font_size.js delete mode 100644 common/js/gallery.js diff --git a/common/js/font_size.js b/common/js/font_size.js deleted file mode 100644 index 8b13789..0000000 --- a/common/js/font_size.js +++ /dev/null @@ -1 +0,0 @@ - diff --git a/common/js/gallery.js b/common/js/gallery.js deleted file mode 100644 index 9ff212f..0000000 --- a/common/js/gallery.js +++ /dev/null @@ -1,32 +0,0 @@ -var modalEle = document.querySelector(".modal_gal"); -var modalImage = document.querySelector(".gallery_img"); -Array.from(document.querySelectorAll(".img_thumb")).forEach(item => { - item.addEventListener("click", event => { - modalEle.style.display = "block"; - modalImage.src = event.target.src; - }); -}); -document.querySelector(".close").addEventListener("click", () => { - modalEle.style.display = "none"; -}); - -function image_modal(document){ - // Get the modal - var modal = document.getElementById("modal_gallery"); - // Get the image and insert it inside the modal - use its "alt" text as a caption - var img = document.getElementById("myImg"); - var modalImg = document.getElementById("modal_img"); - var captionText = document.getElementById("modal_img_caption"); - img.onclick = function(){ - modal.style.display = "block"; - modalImg.src = this.src; - captionText.innerHTML = this.alt; - } - // Get the element that closes the modal - var span = document.getElementsByClassName("close_modal")[0]; - - // When the user clicks on (x), close the modal - span.onclick = function() { - modal.style.display = "none"; - } -}