Share-link domains: ctbgo.com (active, site config shareDomain) and mylinehq.com (spare) 302 /<name> to /join/<name> (query kept, noindex); member invite line and promo tools now hand out https://ctbgo.com/<name>; old instantadpay.com/join links keep working

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-20 05:46:58 -05:00
parent 4df932723e
commit 2e0a4af28f
3 changed files with 23 additions and 3 deletions
+9 -2
View File
@@ -1,3 +1,8 @@
// member share links go out on the share domain (2026-10-20): https://ctbgo.com/<name> -> /join/<name> on InstantAdPay.
// The domain comes from site config (shareDomain); empty falls back to this site's own /join link.
let SHARE_DOMAIN = '';
const SHARE_READY = fetch('/api/config').then(r => r.json()).then(c => { SHARE_DOMAIN = String((c && c.shareDomain) || '').trim(); }).catch(() => {});
function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(String(ref)) ? 'https://' + SHARE_DOMAIN + '/' + ref : location.origin + '/join/' + ref; }
// My account: email-first join/login, wallet link at purchase time,
// free payout activation, invite link, on-chain activity.
(async function () {
@@ -728,7 +733,8 @@
}
} catch (e) {}
// ready-to-send share message + promo tools, personalized
const link = location.origin + '/join/' + (d.username || d.refCode || d.memberId || '');
await SHARE_READY;
const link = shareLink(d.username || d.refCode || d.memberId || '');
fillPromo(link, d);
// founding-week readiness: shown until every item is done (or the launch moment is a week past)
try {
@@ -911,7 +917,8 @@
+ '<br>On-chain member: ' + (me.memberId ? '#' + me.memberId : 'not yet');
// the share link works from day one; usernames make it a vanity link
if (me.username || me.refCode || me.memberId) {
$('inviteLine').textContent = location.origin + '/join/' + (me.username || me.refCode || me.memberId);
await SHARE_READY;
$('inviteLine').textContent = shareLink(me.username || me.refCode || me.memberId);
$('copyInvite').hidden = false;
} else {
$('inviteLine').textContent = 'Sign in with your email to get your link.';
+1 -1
View File
@@ -1186,7 +1186,7 @@
<script src="/assets/wallet.js?v=20260911a"></script>
<script src="/assets/promo.js?v=20261016p"></script>
<script src="/assets/support.js?v=20261016a"></script>
<script src="/assets/my.js?v=20261018tiers"></script>
<script src="/assets/my.js?v=20261020share"></script>
<script src="/assets/chat.js?v=20261016n"></script>
</body>
</html>