/** * TANA STUDIO — Manage Subscription Button Injection * Add this to: Uscreen Admin → Settings → Advanced → Head Code Snippet * Paste ALONGSIDE your existing checkout intercept code — do not replace it. * * What it does: * Watches for the native Uscreen message shown to Lemon Squeezy members: * "Changes to the membership are managed outside the platform" * and injects a "Manage your subscription" button directly beneath it. * * PayPal / native Uscreen members never see this message, * so this button will never appear for them. Zero impact on their experience. */ (function () { var LS_PORTAL_URL = 'https://tanastudioonline.lemonsqueezy.com/billing'; function injectButton() { var el = document.querySelector('[data-test="manual-billing-message"]'); if (el && !el.dataset.lsInjected) { el.dataset.lsInjected = 'true'; var btn = document.createElement('a'); btn.href = LS_PORTAL_URL; btn.target = '_blank'; btn.rel = 'noopener noreferrer'; btn.innerHTML = 'Manage your subscription →'; btn.style.cssText = [ 'display:inline-block', 'margin-top:10px', 'padding:8px 16px', 'background:#C4A882', 'color:#ffffff', 'font-size:13px', 'font-weight:500', 'text-decoration:none', 'border-radius:6px', 'font-family:inherit', 'letter-spacing:0.01em' ].join(';'); el.parentNode.insertBefore(btn, el.nextSibling); return true; } return false; } // Try on DOMContentLoaded first document.addEventListener('DOMContentLoaded', function () { if (!injectButton()) { // Uscreen is a SPA — content loads dynamically after initial paint. // MutationObserver watches for DOM changes and retries automatically. var observer = new MutationObserver(function () { if (injectButton()) { observer.disconnect(); } }); observer.observe(document.body, { childList: true, subtree: true }); // Safety cutoff — stop watching after 10 seconds setTimeout(function () { observer.disconnect(); }, 10000); } }); })(); TANA STUDIO | 50 Min Pilates Yoga Fusion