Spooky Doors promo card link uses ?ref= (consistent with the other programs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
+1
-1
@@ -1128,7 +1128,7 @@
|
||||
</div>
|
||||
<script src="/assets/common.js?v=20260929b"></script><script src="/assets/welcome.js?v=20260923b"></script>
|
||||
<script src="/assets/wallet.js?v=20260911a"></script>
|
||||
<script src="/assets/promo.js?v=20261002sd"></script>
|
||||
<script src="/assets/promo.js?v=20261002ref"></script>
|
||||
<script src="/assets/my.js?v=20261002sdp"></script>
|
||||
<script src="/assets/chat.js?v=20260907l"></script>
|
||||
</body>
|
||||
|
||||
@@ -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/<username>, built in the page from their own username.
|
||||
// before the start). The member's link is SD_URL/?ref=<username>, 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.' });
|
||||
|
||||
Reference in New Issue
Block a user