Oncology & Menopause Massage Cambridgeshire | Helrica Massage Clinic
/* * Only create the listener once, * even if several share buttons appear. */
if (!window.hiShareListenerInstalled) {
window.hiShareListenerInstalled = true;
document.addEventListener('click', async function(event) {
const button = event.target.closest('.hi-share-button');
if (!button) { return; }
event.preventDefault();
const title = button.getAttribute('data-title') || document.title; const text = button.getAttribute('data-text') || ''; const url = button.getAttribute('data-url') || window.location.href;
const wrapper = button.closest('.hi-share-wrap'); const message = wrapper ? wrapper.querySelector('.hi-share-message') : null;
/* * Native phone/tablet/browser share */ if (navigator.share) {
try {
await navigator.share({ title: title, text: text, url: url });
} catch (error) {
/* * Ignore AbortError because this simply * means the visitor closed the share box. */
if (error.name !== 'AbortError') {
try {
await navigator.clipboard.writeText( text + '\n\n' + url );
if (message) {
message.textContent = 'Link copied';
setTimeout(function() { message.textContent = ''; }, 2500); }
} catch (copyError) {
window.prompt( 'Copy this link:', url ); } } }
/* * Desktop/browser fallback */ } else {
try {
await navigator.clipboard.writeText( text + '\n\n' + url );
if (message) {
message.textContent = 'Link copied';
setTimeout(function() { message.textContent = ''; }, 2500); }
} catch (error) {
window.prompt( 'Copy this link:', url ); } }
});
}
How to connect
Each practitioner manages their own bookings directly.

