SIGN UP FOR HEALTHSCREEN UPDATES
document.addEventListener("DOMContentLoaded", function () { var tabs = document.querySelectorAll(".hs-tab"); tabs.forEach(function (tab) { var header = tab.querySelector(".hs-tab-header"); var content = tab.querySelector(".hs-tab-content"); if (!header || !content) return; header.addEventListener("click", function (e) { e.preventDefault(); e.stopPropagation(); // важно за Salient var isOpen = tab.classList.contains("is-open"); if (isOpen) { tab.classList.remove("is-open"); content.style.maxHeight = "0px"; } else { tab.classList.add("is-open"); content.style.maxHeight = content.scrollHeight + "px"; } }); // ако табът има class="is-open", го отваряме при зареждане if (tab.classList.contains("is-open")) { content.style.maxHeight = content.scrollHeight + "px"; } }); // UPDATE при resize window.addEventListener("resize", function () { tabs.forEach(function (tab) { if (tab.classList.contains("is-open")) { var content = tab.querySelector(".hs-tab-content"); content.style.maxHeight = content.scrollHeight + "px"; } }); }); });
// FIX 1 — Prevent Stripe from throwing fatal error if #card-element is missing document.addEventListener("DOMContentLoaded", function () { try { const cardElement = document.querySelector("#card-element"); if (!cardElement) { // override Stripe.mount so it doesn't break the page if (window.Stripe) { const originalStripe = window.Stripe; window.Stripe = function(){ const stripeObj = originalStripe.apply(this, arguments); stripeObj.elements = function(){ return { create: function(){ return { mount: function(){ /* do nothing */ } }; } }; }; return stripeObj; }; } } } catch (e) { console.warn("Stripe Fix Active:", e); } }); // FIX 1 — Prevent Stripe from throwing fatal error if #card-element is missing document.addEventListener("DOMContentLoaded", function () { try { const cardElement = document.querySelector("#card-element"); if (!cardElement) { // override Stripe.mount so it doesn't break the page if (window.Stripe) { const originalStripe = window.Stripe; window.Stripe = function(){ const stripeObj = originalStripe.apply(this, arguments); stripeObj.elements = function(){ return { create: function(){ return { mount: function(){ /* do nothing */ } }; } }; }; return stripeObj; }; } } } catch (e) { console.warn("Stripe Fix Active:", e); } });Skip to main content