In case someone wants to customize a specific gallery, you can find it by section name. You can make a section with a slug, for example: "home-testimonials". Then, find the gallery that resides inside this container.
Example:
<script>
Y.on('domready', function () {
try {
var container = Y.one("#home-testimonials");
var gallery = Y.Squarespace.GalleryManager.getGalleryByContainer(container);
gallery.setAttrs({
"autoplay":true,
"autoplayOptions": {
"timeout":20000,
"randomize": true
}
});
} catch (e) {
console.erro