Jump to content

ShaneV

Member
  • Posts

    1
  • Joined

  • Last visited

Everything posted by ShaneV

  1. <script> document.addEventListener("DOMContentLoaded", function() { function render(checked, index) { (function(p, show) { var map; var values; var messageValue; var messages; var name; var type; var k; map = document.querySelectorAll(p ? p : 'section.gallery-section,\x20.gallery-lightbox'); name = map.length; for (; name--;) { values = map[name].querySelectorAll(show ? show : '[class*=\x27-item\x27]:not([class*=\x27item-\x27])'); type = values.length; for (; type--;) { messageValue = values[type].getElementsByTagName('img')[0]['alt']['trim'](); if (messageValue && messageValue.includes("png") == false && messageValue.includes("jpg") == false) { messages = document.createElement('div'); messages.className = 'gallery-item-description'; messages.textContent = messageValue; values[type].appendChild(messages); } } } })(checked, index); } render(); }); </script> Here is an deobfuscated version of the original script. It works the same but is much more human readable. It also does not include image file names if they end in "png" or "jpg."
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.