Jump to content

elstevedore

Member
  • Posts

    1
  • Joined

  • Last visited

Everything posted by elstevedore

  1. This was hugely helpful. Did anyone ever figure out how to get the filenames to show up without the extension? I tried to figure it out from looking at the javascript that @brandon posted, but I don't really know what I'm doing. If anyone has figured out how to get the default description to show "filename" instead of "filename.jpg" I would be forever grateful as it would save me a LOT of copy/pasting 😉 UPDATE: I asked a friend (who knows JS), and He tweaked the code to show filenames without extensions. In case anyone else is trying to accomplish the same thing: <script> document.addEventListener("DOMContentLoaded", function() { addGalleryItemDescriptions(); function addGalleryItemDescriptions(gs, gdzs) { var a = ['querySelectorAll', 'section.gallery-section,\x20.gallery-lightbox', 'length', '[class*=\x27-item\x27]:not([class*=\x27item-\x27])', 'getElementsByTagName', 'img', 'alt', 'trim', 'createElement', 'div', 'className', 'gallery-item-description', 'textContent', 'appendChild']; var b = function(c, d) { c = c - 0x0; var e = a[c]; return e; }; (function(c, d) { var e, f, g, h, i, j, k; e = document[b('0x0')](c ? c : b('0x1')); i = e[b('0x2')]; while (i--) { f = e[i][b('0x0')](d ? d : b('0x3')); j = f[b('0x2')]; while (j--) { g = f[j][b('0x4')](b('0x5'))[0x0][b('0x6')][b('0x7')](); if (g) { h = document[b('0x8')](b('0x9')); h[b('0xa')] = b('0xb'); h[b('0xc')] = g.replace(/\..+$/,''); f[j][b('0xd')](h); } } } }(gs, gdzs)); } }); </script>
×
×
  • 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.