`,
},
}),
instantsearch.widgets.configure({
hitsPerPage: 8,
filters: "podcast_id=13253512061650",
}),
instantsearch.widgets.pagination({
container: "#pagination",
}),
]);
search.start();
});
$("#algoliaSearchModal").on("shown.bs.modal", function () {
$(".ais-SearchBox-input").trigger("focus");
});
// Just open the Algolia Search in case user goes to /search
// Check if the URL path ends with '/search'
if (pathName.endsWith('/search/') ) {
// In case of smaller screens, toggle the hamburger menu
if( $('.hamburger-box').is(':visible') ){
//console.log("Hamburger about to be clicked");
document.getElementById("page-hamburger-navbar-toggler").classList.add("is-active");
document.getElementById("page-hamburger-navbar-toggler").click();
};
// Trigger the Algolia Search
//console.log("Search button about to be clicked");
document.getElementById("search-button").click();
$(".ais-SearchBox-input").trigger("focus");
};
});