From 4e5e4148446c8a0f4ba233c155cd04f8f23396e0 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 12 Oct 2024 16:48:59 -0400 Subject: [PATCH] Fix that last thing --- themes/red/assets/js/gallery.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/themes/red/assets/js/gallery.js b/themes/red/assets/js/gallery.js index c5cfdde..99bfdfe 100644 --- a/themes/red/assets/js/gallery.js +++ b/themes/red/assets/js/gallery.js @@ -1,9 +1,6 @@ imagesLoaded(document.querySelector('.grid'), function(instance) { - var typeIcons = document.getElementsByClassName('gallery-type-icon-hidden'); - - for(var i = 0; i < typeIcons.length; i++) { - typeIcons[i].classList.remove("gallery-type-icon-hidden"); - } + const typeIcons = document.querySelectorAll('.gallery-type-icon-hidden'); + typeIcons.forEach(element => element.classList.remove('gallery-type-icon-hidden')); new Masonry('.grid', { itemSelector: '.grid-item',