From 217802d577bb8afef92291283c87e1ec955651df Mon Sep 17 00:00:00 2001 From: martbost Date: Fri, 2 Oct 2026 16:07:09 -0500 Subject: [PATCH] Spooky Doors promo card link uses ?ref= (consistent with the other programs) Co-Authored-By: Claude Opus 5.5 --- public/assets/promo.js | 2 +- public/my.html | 2 +- server.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/assets/promo.js b/public/assets/promo.js index 73c8f96..04c9e37 100644 --- a/public/assets/promo.js +++ b/public/assets/promo.js @@ -282,7 +282,7 @@ window.IAPPromo = (function () { const pill = document.querySelector('.promo-pills [data-promo="spookydoors"]'); if (!s || !s.show) { if (pill) pill.hidden = true; sdp.hidden = true; return; } if (pill) pill.hidden = false; - const enc = encodeURIComponent, sl = String(s.base || 'https://spookydoors.com') + '/r/' + enc(token), img = s.image || 'https://spookydoors.com/og-spookydoors.jpg'; + const enc = encodeURIComponent, sl = String(s.base || 'https://spookydoors.com') + '/?ref=' + enc(token), img = s.image || 'https://spookydoors.com/og-spookydoors.jpg'; const day = (d, back) => { const t = new Date(d + 'T12:00:00Z'); if (back) t.setUTCDate(t.getUTCDate() - 1); return t.toLocaleDateString('en-US', { month: 'short', day: 'numeric', timeZone: 'UTC' }); }; const ends = s.season && s.season.end ? day(s.season.end, true) : 'Oct 31'; $('sdpSub').textContent = s.preview && s.season ? 'preview: members see this card from ' + day(s.season.start) + ' to ' + ends : 'our Halloween game, limited time, ends ' + ends; diff --git a/public/my.html b/public/my.html index c06ae61..444c3f1 100644 --- a/public/my.html +++ b/public/my.html @@ -1128,7 +1128,7 @@ - + diff --git a/server.js b/server.js index bb5e38e..9d57014 100644 --- a/server.js +++ b/server.js @@ -2670,7 +2670,7 @@ const server = http.createServer(async (req, res) => { } // -- Spooky Doors hand-off (2026-10-02): sign the member across; the game verifies with SD_SSO_SECRET // -- Spooky Doors promo card in Promo tools (2026-10-02): shown on the same season window as the Games card (admin preview - // before the start). The member's link is SD_URL/r/, built in the page from their own username. + // before the start). The member's link is SD_URL/?ref=, built in the page from their own username. if (p === '/api/my/spookydoors/promo' && req.method === 'GET') { const s = await auth.fromRequest(req); if (!s || !s.email) return json(res, 401, { error: 'Sign in first.' });