OK, update is that I got it working on Desktop, but the altered version of the button does not appear on mobile
https://flamingo-tetra-m678.squarespace.com/potions#
This is the code I injected into the footer to achieve this:
<script>
(function() {
document.addEventListener('DOMContentLoaded', () => {
const button = document.querySelector('#collection-668e344776855f0576b5a00d .header-actions--right .header-actions-action--cta a');
if (button) {
// Change the href attribute
button.setAttribute('href', '#openPotionsModal');
// Change the inner HTML
button.innerHTML = 'Open Potions Modal';
// Ensure the button is visible
button.style.display = 'block';
}
});
})();
</script>
Any Idea how I would adjust for mobile?