Files
instantadpay/public/assets/partners.js
T
martbost 9316dfc0db Toolkit: ship the rest of the ladder (Spark templates + handout, Circuit Video Maker + split tester, Nexus Leader Ops, grants, co-brand, partner code)
- Spark: one-tap banner/text campaign templates aimed at the member's link (POST /api/my/toolkit/template); printable QR handout at /handout/<username>
- Circuit: videomaker.js renders every promo video/short with the member's end card + QR via ffmpeg (Dockerfile adds ffmpeg + ttf-dejavu), hosted in Spaces; split tester compares join angles
- Nexus: Leader Ops (three-level triage, stalled flags, one-click nudges), AI team broadcast kind + Send to my team, credit grants from the leader's earned pool, co-branded join page (sponsor bio for level-3 sponsors), member-funded partner code (promo_codes.funder; redemption charges the funder) + /partners?ref=<username>
- toolkit ladder all live; chatbot updated; my.js v20260914e, site.css v20260914c, join.js/partners.js v20260914a

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-14 07:15:43 -05:00

22 lines
1.6 KiB
JavaScript

// Site-owner partner page: ?name=First greets the owner, ?promo=CODE rides along into the
// company placement link and the example builder link. Display only; placement and credits
// come from the join route and the promo code.
(function () {
const q = new URLSearchParams(location.search);
const name = String(q.get('name') || '').replace(/[^A-Za-zÀ-ɏ' -]/g, '').trim().slice(0, 30);
const promo = String(q.get('promo') || '').toUpperCase().replace(/[^A-Z0-9_-]/g, '').slice(0, 24);
const ref = String(q.get('ref') || '').toLowerCase().replace(/[^a-z0-9_]/g, '').slice(0, 20); // a member's own partner kit (Nexus): the deal lands under them
const hello = document.getElementById('pkHello');
if (hello && name) { hello.textContent = name + ', this page is for you. Your spot directly under the company at the top is reserved; activate with the $20 package to claim it.'; hello.style.display = 'block'; }
const cta = document.getElementById('pkCta');
if (cta) {
const p = new URLSearchParams(); if (name) p.set('name', name); if (promo) p.set('promo', promo);
cta.href = (ref ? '/join/' + ref : '/join/company') + (p.toString() ? '?' + p.toString() : '');
if (name) cta.textContent = 'Claim my spot, ' + name;
}
const ex = document.getElementById('pkExample');
if (ex && promo) ex.textContent = 'https://instantadpay.com/join/yourname?promo=' + promo;
const sub = document.getElementById('pkCtaSub');
if (sub && promo) sub.textContent = 'Free account by email. No password, no wallet today. The link below places you directly under the company and applies your code ' + promo + ' as well.';
})();