Spooky Doors door check uses Halloween icons (pumpkin, ghost, bat, candy...) instead of the generic set

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-02 10:10:41 -05:00
parent 27c9d51fde
commit 3b57bbc9cf
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -269,6 +269,8 @@ const earnTokens = persistedMap('earn');
// human-check pairs for the view verifier: [emoji shown, word named in the prompt]
const CAPTCHA = [['🚀', 'rocket'], ['⚡', 'lightning bolt'], ['🔑', 'key'], ['🎯', 'target'],
['🌊', 'wave'], ['🔥', 'flame'], ['💎', 'diamond'], ['🧲', 'magnet'], ['🔔', 'bell'], ['🌙', 'moon']];
// Spooky Doors' door check uses Halloween icons (Marty, 2026-10-02)
const DOOR_CAPTCHA = [['🎃', 'pumpkin'], ['👻', 'ghost'], ['🦇', 'bat'], ['🍬', 'candy'], ['🕷️', 'spider'], ['💀', 'skull'], ['🍭', 'lollipop'], ['🧙', 'witch'], ['🕸️', 'spider web'], ['🌕', 'full moon'], ['🍫', 'chocolate']];
// ── frame-breaking check ─────────────────────────────────
// Surf views frame the advertiser's URL full screen, so a target that refuses
@@ -2819,7 +2821,7 @@ const server = http.createServer(async (req, res) => {
if (!t || t.done) return json(res, 400, { error: 'That door is no longer open.' });
const dwellMs = (t.kind === 'video' ? t.secs : (ads.rates().visitDwellSeconds || 8)) * 1000; const age = Date.now() - t.ts;
if (age < dwellMs - 400) return json(res, 200, { early: true, wait: Math.ceil((dwellMs - age) / 1000) });
const pick = CAPTCHA.slice().sort(() => Math.random() - 0.5).slice(0, 5); const answer = Math.floor(Math.random() * pick.length);
const pick = DOOR_CAPTCHA.slice().sort(() => Math.random() - 0.5).slice(0, 5); const answer = Math.floor(Math.random() * pick.length);
t.challenge = { answer }; doorTokens.set(n, t);
return json(res, 200, { prompt: pick[answer][1], options: pick.map(x => x[0]) });
}