From 5db6cdff52109f90a750926bd4c2b4d0b6ad74e5 Mon Sep 17 00:00:00 2001 From: martbost Date: Sun, 20 Sep 2026 07:59:52 -0500 Subject: [PATCH] Code pill: six fixed cells on their own row, tap to copy, wrapping header; claim error names the length when it is not 6; board hint Co-Authored-By: Claude Fable 5.1 --- lib/missions.js | 1 + public/app.html | 2 +- public/app.js | 2 +- public/embed.js | 9 +++++++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/missions.js b/lib/missions.js index f496cd5..8457b8e 100644 --- a/lib/missions.js +++ b/lib/missions.js @@ -73,6 +73,7 @@ function check(t, memberId, typed) { if (rec.memberId !== Number(memberId)) return { error: 'That mission belongs to a different account.' }; const want = codeFor(rec); const got = String(typed || '').trim().toUpperCase(); + if (got.length !== 6) return { error: 'Codes are 6 characters and you typed ' + got.length + '. Look at the site again: the code sits in six boxes, and a tap on it copies all six.' }; if (got !== want) return { error: 'That is not the code. It is on the site, and it is yours alone.' }; return { ok: true, rec }; } diff --git a/public/app.html b/public/app.html index e164722..4216591 100644 --- a/public/app.html +++ b/public/app.html @@ -46,6 +46,6 @@
Rewards are for completed missions, not income. The daily pool is limited; when it is spent, claims close until midnight Central. Cryptocurrency involves risk of loss.
- + diff --git a/public/app.js b/public/app.js index b297f24..196053b 100644 --- a/public/app.js +++ b/public/app.js @@ -36,7 +36,7 @@ + '

' + r.minPol + ' to ' + r.maxPol + ' POL · ' + m.dwell + 's on the site

' + (m.done ? '' : (board.pool && board.pool.spent && !isOpen) ? '
Closed until midnight Central
' : (board.daily && !board.daily.left && !isOpen) ? '
Back tomorrow
' : isOpen ? '
Your code appears on the site after ' + m.dwell + 's. Keep that tab open.
' - + '
' + + '
Six characters. On the site, tap the code to copy it, then paste it here.
' + '
' + '

Open the site again ↗

' : '
') diff --git a/public/embed.js b/public/embed.js index 73beb8b..8213eea 100644 --- a/public/embed.js +++ b/public/embed.js @@ -27,8 +27,13 @@ var el = slotEl(slot); el.innerHTML = ''; var box = document.createElement('div'); box.setAttribute('role', 'note'); - box.style.cssText = 'display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border-radius:14px;background:linear-gradient(135deg,#1a0f3d,#2b1a63);color:#f1eefb;font:600 14px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;box-shadow:0 8px 30px rgba(130,71,229,.45),0 0 0 1px rgba(255,255,255,.08);letter-spacing:.02em'; - box.innerHTML = 'PolHunter code ' + code + ''; + // the code as six fixed cells on its own row: a short read is visible at a glance, nothing can wrap or clip + // a single glyph away, and a tap copies it for the board (OPG saw 5 of 6 characters twice, 2026-09-20) + box.style.cssText = 'display:inline-flex;flex-direction:column;align-items:flex-start;gap:8px;padding:12px 14px;border-radius:14px;background:linear-gradient(135deg,#1a0f3d,#2b1a63);color:#f1eefb;font:600 13px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;box-shadow:0 8px 30px rgba(130,71,229,.45),0 0 0 1px rgba(255,255,255,.08);letter-spacing:.02em;max-width:100%;cursor:pointer;-webkit-user-select:none;user-select:none'; + var cells = code.split('').map(function (ch) { return '' + ch + ''; }).join(''); + box.innerHTML = 'PolHunter code 6 characters, tap to copy' + cells + ''; + box.setAttribute('title', 'Tap to copy ' + code); + box.addEventListener('click', function () { var done = function () { var s = box.querySelector('span span'); if (s) s.textContent = 'copied, paste it on your board'; }; try { navigator.clipboard.writeText(code).then(done, done); } catch (e) { done(); } }); el.appendChild(box); } var tries = 0, pending = null, done = false;