b2eff3d3be
/contact/book/ now needs ?submitted=1 (set in the GHL form redirect) to load the calendars; other visitors get a prompt that links to the form. The page is noindex and out of the sitemap, the contact page card points to the form, and visitors are sent back to the language they filled the form in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
1.1 KiB
JavaScript
24 lines
1.1 KiB
JavaScript
(function () {
|
|
if (document.documentElement.getAttribute('data-gate') !== 'open') return;
|
|
document.querySelectorAll('iframe[data-src]').forEach(function (f) { f.src = f.getAttribute('data-src'); });
|
|
var tabs = document.querySelectorAll('[data-call]');
|
|
var select = function (id, scroll) {
|
|
tabs.forEach(function (t) {
|
|
var on = t.getAttribute('data-call') === id;
|
|
t.setAttribute('aria-selected', String(on));
|
|
var panel = document.getElementById('cal-' + t.getAttribute('data-call'));
|
|
if (panel) { if (on) panel.removeAttribute('data-off'); else panel.setAttribute('data-off', ''); }
|
|
});
|
|
if (scroll) document.getElementById('schedule').scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
};
|
|
tabs.forEach(function (t) {
|
|
t.addEventListener('click', function () {
|
|
var id = t.getAttribute('data-call');
|
|
select(id, true);
|
|
try { history.replaceState(null, '', '#' + id); } catch (e) {}
|
|
});
|
|
});
|
|
var hash = location.hash.replace('#', '');
|
|
if (hash === 'free' || hash === 'vip') select(hash, false);
|
|
})();
|