Jump to content

rodri333

Member
  • Posts

    9
  • Joined

  • Last visited

Reputation Activity

  1. Like
    rodri333 reacted to jpeter in Hide End Times from Events in Summary Block   
    @rodri333 You can get away with this using JS, here's the code:
    (function () { if (window.NodeList && !NodeList.prototype.forEach) { NodeList.prototype.forEach = Array.prototype.forEach; } if (document.readyState == 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } function init() { var elements = document.querySelectorAll('.event-time-12hr'); if(elements) { elements.forEach(function (el) { var time = el.textContent; el.textContent = time.replace(/^(\d+:\d+\s?(?:A|P)M).*$/, '$1'); }); } } })(); Be sure to add the JS code between <script> tag, e.g.
    <script> // Add JS code here </script>  
    Here's a video of me running the script using Chrome's dev console:

    Nx2trLElSa.mp4
×
×
  • 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.