Join page names the owner of the link it was opened with, and tells a member when they are previewing their own page
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -157,6 +157,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/common.js?v=20260913a"></script>
|
||||
<script src="/assets/join.js?v=20260912d"></script>
|
||||
<script src="/assets/join.js?v=20260913a"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user