Archived
94f6e749a0
Recovers original JS from git history and ports it into proper El source files under src/js/. Each file wraps the original JS in a native_js call inside a main() function, making it valid El that compiles to a self-contained IIFE via elc --target=js --bundle. Files added: src/js/account-auth.el - Supabase OTP magic-link (sendMagicLink) src/js/account-dashboard.el - Account dashboard: session, plan card, family src/js/chat-widget.el - Demo chat widget (neuronDemoToggle/Send/Reset) src/js/checkout-auth.el - Checkout auth: OAuth, email sign-in/up src/js/checkout-free.el - Free plan: auth-badge watch -> payment reveal src/js/checkout-stripe.el - Stripe Payment Element (reads NEURON_CFG) src/js/enterprise.el - Enterprise inquiry form + headcount filter src/js/environmental.el - Efficiency calculator slider src/js/gallery.el - Gallery nav, search/sort, Supabase voting src/js/main.el - Share page voting + copyForPlatform src/js/marketplace.el - Developer interest form src/js/nav.el - Nav hamburger + Mission dropdown src/js/styles.el - Landing: nav scroll, reveal, founding counter
18 lines
578 B
EmacsLisp
18 lines
578 B
EmacsLisp
// checkout-free.el -- Free plan: reveal payment section after auth completes.
|
|
// Watches the auth-badge element; when it becomes visible, shows payment-section.
|
|
// Compiled with: elc --target=js --bundle --minify --obfuscate
|
|
|
|
fn main() -> Void {
|
|
native_js("(function() {
|
|
var pay = document.getElementById('payment-section');
|
|
if (!pay) return;
|
|
var timer = setInterval(function() {
|
|
var badge = document.getElementById('auth-badge');
|
|
if (badge && badge.offsetParent !== null) {
|
|
pay.style.display = '';
|
|
clearInterval(timer);
|
|
}
|
|
}, 150);
|
|
})()")
|
|
}
|