diff --git a/public/assets/join.js b/public/assets/join.js
index 0337e29..7635636 100644
--- a/public/assets/join.js
+++ b/public/assets/join.js
@@ -88,10 +88,11 @@
// sponsor line (the link opened most recently sets the sponsor; it locks at account creation)
let sponsorName = '';
- fetch('/api/sponsor').then(r => r.json()).then(sp => {
+ const linkTok = (location.pathname.match(/^\/join\/([^/?#]+)/) || [])[1] || '';
+ fetch('/api/sponsor' + (linkTok ? '?ref=' + encodeURIComponent(linkTok) : '')).then(r => r.json()).then(sp => {
if (sp && sp.invited && sp.name) {
sponsorName = sp.name;
- $('jnSponName').textContent = sp.name;
+ $('jnSponName').textContent = sp.name + (sp.own ? ' (this is your own invite page; visitors see your name here)' : '');
if (sp.avatarUrl) { $('jnSponImg').src = sp.avatarUrl; $('jnSponImg').hidden = false; }
$('jnSpon').hidden = false;
}
diff --git a/public/join.html b/public/join.html
index 79e4c30..bff6583 100644
--- a/public/join.html
+++ b/public/join.html
@@ -157,6 +157,6 @@
-
+