How to make Reel slideshow autoscroll

You can use this code to Code Injection Footer (or Page Header Injection) to make Gallery Reel autoscroll in Squarespace.

<script>
(function docReady(fn) {
    // see if DOM is already available
    if (document.readyState === "complete" || document.readyState === "interactive") {
        // call on next available tick
        setTimeout(fn, 1);
    } else {
        document.addEventListener("DOMContentLoaded", fn);
    }
})(() => {
    if (window.location == window.parent.location) {
        const reelControls = document.querySelectorAll('.gallery-reel-control [aria-label="Next Slide"]');
        reelControls.forEach(reelControl => {
            (function reelTimer() {
                setTimeout(() => {
                    reelControl.click();
                    reelTimer();
                }, 2000); // change this value to change the speed
            })();
        })
    }
});
</script>