@ywkrlerche/richardwho 1.0.50 โ 1.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.js +153 -36
- package/games.json +9568 -1
- package/index.html +15 -9
- package/krillionwho-data.js +2 -0
- package/krillionwho.css +377 -0
- package/krillionwho.js +1670 -0
- package/logos/cat-mario.webp +0 -0
- package/logos/gn-41.webp +0 -0
- package/logos/gn-557.webp +0 -0
- package/logos/krillionwho.svg +27 -0
- package/logos/spider-solitaire.webp +0 -0
- package/package.json +4 -1
- package/style.css +70 -32
- package/logos/gn-26.webp +0 -0
- package/logos/gn-506.png +0 -0
- package/logos/gn-694.png +0 -0
- package/logos/gn-851.png +0 -0
package/app.js
CHANGED
|
@@ -21,17 +21,6 @@
|
|
|
21
21
|
"papas-freezeria", "basket-random", "drift-boss", "monkey-mart", "temple-run-2", "happy-wheels",
|
|
22
22
|
"jetpack-joyride", "cut-the-rope", "friday-night-funkin", "plants-vs-zombies", "crossy-road", "run-3"];
|
|
23
23
|
|
|
24
|
-
// Games added in this release (newest first). Shown as the "Recently added" strip on the Games page.
|
|
25
|
-
const RECENTLY_ADDED = [
|
|
26
|
-
"gn-851", // GTA III (fan remake)
|
|
27
|
-
"gn-187", // Papers, Please (fan remake)
|
|
28
|
-
"gn-10", "gn-24", "gn-27", "gn-183", "gn-262", "gn-263", "gn-314", "gn-465", "gn-468",
|
|
29
|
-
"gn-505", "gn-506", "gn-508", "gn-588", "gn-602", "gn-611", "gn-612", "gn-623", "gn-626",
|
|
30
|
-
"gn-669", "gn-693", "gn-694", "gn-696", "gn-771", "gn-789", "gn-861", "gn-868", "gn-874",
|
|
31
|
-
"gn-117", "gn-123", "gn-124", "gn-129", "gn-176", "gn-186", "gn-198", "gn-200", "gn-286",
|
|
32
|
-
"gn-294", "gn-296", "gn-310", "gn-330", "gn-441", "gn-702",
|
|
33
|
-
];
|
|
34
|
-
|
|
35
24
|
const $ = (id) => document.getElementById(id);
|
|
36
25
|
const els = {
|
|
37
26
|
homeView: $("view-home"), gamesView: $("view-games"), homeInput: $("home-input"), homeSub: $("home-sub"),
|
|
@@ -39,7 +28,6 @@
|
|
|
39
28
|
allTitle: $("all-title"),
|
|
40
29
|
recentBlock: $("recent-block"), recentRow: $("recent-row"),
|
|
41
30
|
popularBlock: $("popular-block"), marquee: $("marquee"), marqueeTrack: $("marquee-track"),
|
|
42
|
-
newBlock: $("new-block"), newRow: $("new-row"),
|
|
43
31
|
player: $("player"), frame: $("game-frame"), playerTitle: $("player-title"),
|
|
44
32
|
loader: $("loader"), loaderName: $("loader-name"), loaderDesc: $("loader-desc"), loaderArt: $("loader-art"),
|
|
45
33
|
barFill: $("bar-fill"), loaderStatus: $("loader-status"), retryBtn: $("retry-btn"),
|
|
@@ -151,9 +139,9 @@
|
|
|
151
139
|
// Strips are for browsing; hide them while searching or filtering
|
|
152
140
|
const browsing = !raw && activeTag === "All";
|
|
153
141
|
els.popularBlock.hidden = !browsing;
|
|
142
|
+
$("dive-banner").hidden = !browsing;
|
|
154
143
|
$("gotd").hidden = !browsing || !$("gotd").children.length;
|
|
155
144
|
els.recentBlock.hidden = !browsing || !els.recentRow.children.length;
|
|
156
|
-
els.newBlock.hidden = !browsing || !els.newRow.children.length;
|
|
157
145
|
}
|
|
158
146
|
|
|
159
147
|
function renderRecent() {
|
|
@@ -161,11 +149,6 @@
|
|
|
161
149
|
els.recentRow.innerHTML = recent.map((g) => tileHtml(g, { eager: true })).join("");
|
|
162
150
|
els.recentBlock.hidden = recent.length === 0 || !!els.search.value.trim() || activeTag !== "All";
|
|
163
151
|
}
|
|
164
|
-
function renderNew() {
|
|
165
|
-
const added = RECENTLY_ADDED.map((id) => byId.get(id)).filter((g) => g && !g.hidden);
|
|
166
|
-
els.newRow.innerHTML = added.map((g) => tileHtml(g)).join("");
|
|
167
|
-
els.newBlock.hidden = added.length === 0 || !!els.search.value.trim() || activeTag !== "All";
|
|
168
|
-
}
|
|
169
152
|
|
|
170
153
|
function addRecent(id) {
|
|
171
154
|
const list = store.get(RECENT_KEY, []).filter((x) => x !== id);
|
|
@@ -306,6 +289,42 @@
|
|
|
306
289
|
$("gotd").hidden = false;
|
|
307
290
|
}
|
|
308
291
|
|
|
292
|
+
// ---------- The Daily Dive (KrillionWho) at the top of Games ----------
|
|
293
|
+
// Today's dive to play, or "you already did it" with your streak, from what the game saved in this browser
|
|
294
|
+
// (rug-krillionwho: today's progress; rug-krillionwho-stats: the streak). Its buttons open the game section.
|
|
295
|
+
const DIVE_LAUNCH = new Date(2026, 11, 2); // Dive #1
|
|
296
|
+
const ymd = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
|
297
|
+
let diveBannerHtml = "";
|
|
298
|
+
function renderDiveBanner() {
|
|
299
|
+
const now = new Date(), y = now.getFullYear(), mo = now.getMonth(), d = now.getDate();
|
|
300
|
+
const today = ymd(now), yesterday = ymd(new Date(y, mo, d - 1)), no = Math.round((new Date(y, mo, d) - DIVE_LAUNCH) / 864e5) + 1;
|
|
301
|
+
const saved = store.get("rug-krillionwho", null), mine = saved && saved.date === today && Array.isArray(saved.answers) ? saved : null;
|
|
302
|
+
const stats = store.get("rug-krillionwho-stats", {}) || {};
|
|
303
|
+
const streak = stats.streak && (stats.last === today || stats.last === yesterday) ? stats.streak : 0;
|
|
304
|
+
const done = !!(mine && mine.done), going = !!(mine && !done && mine.answers.length);
|
|
305
|
+
const left = new Date(y, mo, d + 1) - now, next = `${Math.floor(left / 3600e3)}h ${Math.floor((left % 3600e3) / 60e3)}m`;
|
|
306
|
+
const fire = streak ? `<span class="dive-streak" title="Days in a row you've done the Daily Dive">๐ฅ ${streak}-day streak</span>` : "";
|
|
307
|
+
const total = done ? Number(mine.total) || 0 : 0;
|
|
308
|
+
const [label, title, desc, btn] = done
|
|
309
|
+
? [`โ
Daily Dive #${no}`, "You already did today's dive", `${total} points ยท ${(total * 10).toLocaleString()}m deep ยท next dive in ${next}`, "See my dive"]
|
|
310
|
+
: going
|
|
311
|
+
? [`๐ Daily Dive #${no}`, "Finish today's dive", `${mine.answers.length} of 7 prompts done. Pick up where you left off.`, "Keep diving โผ"]
|
|
312
|
+
: [`๐ Daily Dive #${no} ยท new today`, "Play today's dive", `${streak ? "Keep your streak alive! " : ""}7 prompts, 25 seconds each. Name the rarest answer you can: the rarer it is, the deeper you sink.`, "โถ Play"];
|
|
313
|
+
const html = `<button class="dive-art" type="button" data-dive="daily" tabindex="-1" aria-hidden="true"><img src="logos/krillionwho.svg" alt="" decoding="async"></button>
|
|
314
|
+
<div class="dive-text"><span class="dive-label">${label}</span><span class="dive-title">${title}${fire}</span><span class="dive-desc">${desc}</span></div>
|
|
315
|
+
<div class="dive-actions"><button class="dive-btn" type="button" data-dive="daily">${btn}</button><button class="dive-more" type="button" data-dive="play">More modes</button></div>`;
|
|
316
|
+
const el = $("dive-banner");
|
|
317
|
+
el.classList.toggle("done", done);
|
|
318
|
+
if (html !== diveBannerHtml) { diveBannerHtml = html; el.innerHTML = html; } // only when it changed, so a focused button stays focused
|
|
319
|
+
}
|
|
320
|
+
$("dive-banner").addEventListener("click", (e) => {
|
|
321
|
+
const b = e.target.closest("[data-dive]");
|
|
322
|
+
if (!b) return;
|
|
323
|
+
kwNext = b.dataset.dive;
|
|
324
|
+
go("krillionwho");
|
|
325
|
+
});
|
|
326
|
+
setInterval(() => { if (!els.gamesView.hidden && !document.hidden) renderDiveBanner(); }, 30e3); // the "next dive in" clock
|
|
327
|
+
|
|
309
328
|
|
|
310
329
|
// ---------- Halloween: decorations on the home page, all of October ----------
|
|
311
330
|
// Drawn once (SVG, emoji and gradients); only the bats and the ghost move, using cheap transforms.
|
|
@@ -492,7 +511,7 @@
|
|
|
492
511
|
for (const h of HOLIDAYS) root.classList.toggle(h, t === h);
|
|
493
512
|
root.classList.toggle("fest", !!FESTS[t]);
|
|
494
513
|
root.classList.toggle("holiday", HOLIDAYS.includes(t)); // shared touches on every page (style.css)
|
|
495
|
-
$("theme-color").content = { white: "#f6f6f8", halloween: "#110820", christmas: "#
|
|
514
|
+
$("theme-color").content = { white: "#f6f6f8", halloween: "#110820", christmas: "#071a33" }[t] || FESTS[t]?.color || "#000000";
|
|
496
515
|
if (t === "halloween" && !document.querySelector(".spooky")) buildHalloween(); // scenery is only drawn once it's needed
|
|
497
516
|
if (t === "christmas" && !document.querySelector(".xmas")) buildChristmas();
|
|
498
517
|
if (FESTS[t]) buildFest(t);
|
|
@@ -685,16 +704,66 @@
|
|
|
685
704
|
};
|
|
686
705
|
|
|
687
706
|
function buildChristmas() {
|
|
688
|
-
const
|
|
689
|
-
const
|
|
690
|
-
|
|
707
|
+
const rnd = (i, k) => Math.abs(Math.sin(i * 12.99 + k * 78.23) * 43758.55) % 1; // same treeline every visit
|
|
708
|
+
const treeline = (base, h, step, k) => {
|
|
709
|
+
let d = `M0 600V${base}`;
|
|
710
|
+
for (let x = 0; x <= 1600; x += step) d += `L${x} ${base}L${x + step / 2} ${(base - h * (.6 + rnd(x, k) * .7)).toFixed(1)}L${x + step} ${base}`;
|
|
711
|
+
return d + "V600H0Z";
|
|
712
|
+
};
|
|
713
|
+
const pine = (w) => Array.from({ length: 6 }, (_, t) => {
|
|
714
|
+
const y = 20 + t * 55, hw = (30 + t * 17) * w;
|
|
715
|
+
return `M100 ${y - 20}L${100 + hw} ${y + 50}Q${100 + hw / 2} ${y + 38} 100 ${y + 46}Q${100 - hw / 2} ${y + 38} ${100 - hw} ${y + 50}Z`;
|
|
716
|
+
}).join("");
|
|
717
|
+
const sidePines = `<path fill="#b9cbe0" d="${pine(1)}"/><path fill="#edf3fa" d="${pine(.72)}"/><path d="M93 345h14v55H93Z" fill="#3b2a20"/>`;
|
|
718
|
+
const tier = (i) => {
|
|
719
|
+
const t = 30 + i * 48, b = t + 80, hw = 40 + i * 22;
|
|
720
|
+
return `<path d="M110 ${t}L${110 + hw} ${b}Q110 ${b - 12} ${110 - hw} ${b}Z" fill="#1f7a3a"/><path d="M110 ${t}L${110 + hw} ${b}Q${110 + hw / 2} ${b - 8} 110 ${b - 10}Z" fill="#166030"/>`;
|
|
721
|
+
};
|
|
722
|
+
const star = Array.from({ length: 10 }, (_, i) => { const r = i % 2 ? 7 : 16, a = Math.PI * i / 5 - Math.PI / 2; return `${(110 + r * Math.cos(a)).toFixed(1)},${(26 + r * Math.sin(a)).toFixed(1)}`; }).join(" ");
|
|
723
|
+
const ornaments = [[96, 92, "#dc2626"], [128, 104, "#2563eb"], [84, 140, "#facc15"], [138, 150, "#dc2626"], [110, 128, "#e5e7eb"], [70, 190, "#2563eb"], [152, 196, "#facc15"], [104, 180, "#dc2626"], [58, 238, "#facc15"], [92, 232, "#2563eb"], [130, 240, "#dc2626"], [168, 234, "#2563eb"]]
|
|
724
|
+
.map(([x, y, c]) => `<circle cx="${x}" cy="${y}" r="5.5" fill="${c}"/><circle cx="${x - 1.8}" cy="${y - 1.8}" r="1.6" fill="#fff" opacity=".7"/>`).join("");
|
|
725
|
+
const twinkles = (k) => Array.from({ length: 9 }, (_, i) => { const tr = 1 + (i % 3), y = 60 + tr * 48 - rnd(i, k) * 30, x = 110 + (rnd(i, k + 5) - .5) * (40 + tr * 40); return `<circle cx="${x.toFixed(1)}" cy="${y.toFixed(1)}" r="2.4"/>`; }).join("");
|
|
726
|
+
const gift = (x, y, w, h, c, r) => `<rect x="${x}" y="${y}" width="${w}" height="${h}" rx="2" fill="${c}"/><rect x="${x + w / 2 - 3}" y="${y}" width="6" height="${h}" fill="${r}"/><rect x="${x}" y="${y + 6}" width="${w}" height="5" fill="${r}"/><path d="M${x + w / 2} ${y}c-8-9-16-3-8 0M${x + w / 2} ${y}c8-9 16-3 8 0" stroke="${r}" stroke-width="3" fill="none"/>`;
|
|
727
|
+
const logs = Array.from({ length: 9 }, (_, i) => { const y = 101 + i * 11; return `<path d="M40 ${y + 10}H280" stroke="#6b4320" stroke-width="2"/><rect x="31" y="${y + 1}" width="12" height="9" rx="4.5" fill="#a87442"/><rect x="277" y="${y + 1}" width="12" height="9" rx="4.5" fill="#a87442"/>`; }).join("");
|
|
728
|
+
const stripes = Array.from({ length: 8 }, (_, i) => `<path d="M54 ${66 + i * 17}l12-7v8l-12 7Z" fill="#dc2626"/>`).join("");
|
|
691
729
|
$("view-home").insertAdjacentHTML("afterbegin", `<div class="xmas" aria-hidden="true">
|
|
692
|
-
<
|
|
693
|
-
|
|
694
|
-
<
|
|
695
|
-
<path
|
|
730
|
+
<svg class="scene" viewBox="0 0 1600 600" preserveAspectRatio="xMidYMax slice">
|
|
731
|
+
<path d="M150 600L470 150L800 600Z" fill="#123f6e"/><path d="M470 150L800 600H600L560 470L585 400L530 300L505 215Z" fill="#1b5689"/>
|
|
732
|
+
<path d="M880 600L1230 165L1580 600Z" fill="#123f6e"/><path d="M1230 165L1580 600H1390L1350 480L1375 390L1300 280L1265 210Z" fill="#1b5689"/>
|
|
733
|
+
<path d="${treeline(470, 70, 22, 1)}" fill="#0f365f"/><path d="${treeline(515, 82, 30, 2)}" fill="#0b2b4e"/><path d="${treeline(560, 96, 40, 3)}" fill="#08213e"/>
|
|
734
|
+
<path d="M0 545C260 505 520 525 760 560S1250 530 1600 515V600H0Z" fill="#c4d4e6"/>
|
|
735
|
+
<path d="M0 580C300 545 560 575 900 590S1400 560 1600 570V600H0Z" fill="#e8f0f8"/>
|
|
736
|
+
</svg>
|
|
737
|
+
<svg class="side l" viewBox="0 0 300 400"><g transform="translate(-10 0)">${sidePines}</g><g transform="translate(150 140) scale(.65)">${sidePines}</g></svg>
|
|
738
|
+
<svg class="side r" viewBox="0 0 300 400"><g transform="translate(-10 0)">${sidePines}</g><g transform="translate(150 140) scale(.65)">${sidePines}</g></svg>
|
|
739
|
+
<svg class="cabin" viewBox="0 0 320 205">
|
|
740
|
+
<rect x="222" y="28" width="18" height="50" fill="#3b2a20"/><rect x="218" y="24" width="26" height="8" rx="3" fill="#edf3fa"/>
|
|
741
|
+
<rect x="40" y="96" width="240" height="104" fill="#8a5a2e"/>${logs}
|
|
742
|
+
<path d="M48 98L160 38L272 98Z" fill="#7a4e27"/>
|
|
743
|
+
<circle cx="160" cy="74" r="13" fill="#fcd34d" stroke="#5b3a1e" stroke-width="5" class="glow"/>
|
|
744
|
+
<path d="M24 100L160 24L296 100L286 108L160 38L34 108Z" fill="#5b3a1e"/>
|
|
745
|
+
<path d="M20 98L160 18L300 98Q296 104 290 102L160 30L30 102Q22 104 20 98Z" fill="#edf3fa"/>
|
|
746
|
+
<rect x="66" y="124" width="46" height="36" fill="#fcd34d" class="glow"/><path d="M89 124v36M66 142h46" stroke="#8a5a2e" stroke-width="3"/><rect x="63" y="121" width="52" height="42" fill="none" stroke="#5b3a1e" stroke-width="4"/>
|
|
747
|
+
<rect x="208" y="124" width="46" height="36" fill="#fcd34d" class="glow"/><path d="M231 124v36M208 142h46" stroke="#8a5a2e" stroke-width="3"/><rect x="205" y="121" width="52" height="42" fill="none" stroke="#5b3a1e" stroke-width="4"/>
|
|
748
|
+
<rect x="140" y="128" width="40" height="72" fill="#5e3a1c" stroke="#3f2611" stroke-width="3"/><path d="M153 132v66M167 132v66" stroke="#3f2611" stroke-width="2"/><circle cx="172" cy="166" r="2.5" fill="#fcd34d"/>
|
|
749
|
+
<ellipse cx="160" cy="202" rx="160" ry="8" fill="#e8f0f8"/>
|
|
750
|
+
</svg>
|
|
751
|
+
<svg class="xtree" viewBox="0 0 220 300">
|
|
752
|
+
<rect x="100" y="246" width="20" height="24" fill="#5b3a1e"/>
|
|
753
|
+
${[0, 1, 2, 3].map(tier).join("")}
|
|
754
|
+
<path d="M80 100Q112 118 142 96M66 150Q112 172 156 146M52 200Q112 226 170 196" stroke="#facc15" stroke-width="2" fill="none" opacity=".75"/>
|
|
755
|
+
${ornaments}
|
|
756
|
+
<g class="tw a" fill="#fde68a">${twinkles(1)}</g><g class="tw b" fill="#fde68a">${twinkles(2)}</g>
|
|
757
|
+
<polygon points="${star}" fill="#facc15" class="glow"/>
|
|
758
|
+
${gift(44, 258, 40, 34, "#dc2626", "#fde68a")}${gift(88, 266, 34, 26, "#f1f5f9", "#dc2626")}${gift(126, 254, 42, 38, "#2563eb", "#f1f5f9")}${gift(170, 268, 30, 24, "#16a34a", "#dc2626")}
|
|
759
|
+
</svg>
|
|
760
|
+
<svg class="sign" viewBox="0 0 120 200">
|
|
761
|
+
<rect x="54" y="40" width="12" height="160" fill="#f8fafc"/>${stripes}
|
|
762
|
+
<path d="M50 42Q60 22 70 42Z" fill="#edf3fa"/>
|
|
763
|
+
<rect x="6" y="62" width="108" height="34" rx="4" fill="#7c4a22" stroke="#5b3a1e" stroke-width="3"/>
|
|
764
|
+
<path d="M4 66q8-11 20-5 12-9 24-3 14-9 26-1 12-8 24-2 12-6 16 6v2H4Z" fill="#edf3fa"/>
|
|
765
|
+
<text x="60" y="86" text-anchor="middle" font-size="13" font-weight="800" fill="#fde68a" letter-spacing="1">NORTH POLE</text>
|
|
696
766
|
</svg>
|
|
697
|
-
<span class="xmas-tree">๐</span><span class="gift g1">๐</span><span class="gift g2">๐</span>
|
|
698
767
|
<svg class="snowman" viewBox="0 0 100 150">
|
|
699
768
|
<path d="M30 64 8 46M14 51l-6 1M12 49l1-7M70 64 92 46M86 51l6 1M88 49l-1-7" stroke="#6b4423" stroke-width="3" stroke-linecap="round" fill="none"/>
|
|
700
769
|
<circle cx="50" cy="114" r="32" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
|
|
@@ -985,11 +1054,11 @@
|
|
|
985
1054
|
}
|
|
986
1055
|
|
|
987
1056
|
// ---------- Routing: "" home, #games, #recent, #play/<id> ----------
|
|
988
|
-
const VIEW_ORDER = ["home", "games", "trivia", "chat", "stats", "settings", "changelog"];
|
|
1057
|
+
const VIEW_ORDER = ["home", "games", "trivia", "krillionwho", "chat", "stats", "settings", "changelog"];
|
|
989
1058
|
let lastView = null;
|
|
990
1059
|
function viewFor(hash) {
|
|
991
1060
|
return hash === "#games" || hash === "#recent" ? "games" : hash === "#settings" ? "settings" : hash === "#chat" ? "chat"
|
|
992
|
-
: hash === "#stats" ? "stats" : hash === "#changelog" ? "changelog" : hash === "#trivia" ? "trivia" : "home";
|
|
1061
|
+
: hash === "#stats" ? "stats" : hash === "#changelog" ? "changelog" : hash === "#trivia" ? "trivia" : hash === "#krillionwho" ? "krillionwho" : "home";
|
|
993
1062
|
}
|
|
994
1063
|
// Switching pages: the old page slides out while the new one slides in (down the side bar = upward,
|
|
995
1064
|
// up the side bar = downward). Uses the browser's view transitions; older browsers just switch.
|
|
@@ -1005,6 +1074,7 @@
|
|
|
1005
1074
|
function routeNow() {
|
|
1006
1075
|
const m = location.hash.match(/^#play\/(.+)$/);
|
|
1007
1076
|
const game = m && byId.get(decodeURIComponent(m[1]));
|
|
1077
|
+
if (game && game.section) { history.replaceState(null, "", PAGE_URL + `#${game.section}`); return routeNow(); } // a built-in game with its own page
|
|
1008
1078
|
if (game) {
|
|
1009
1079
|
els.player.hidden = false;
|
|
1010
1080
|
document.body.classList.add("playing");
|
|
@@ -1032,6 +1102,9 @@
|
|
|
1032
1102
|
$("view-stats").hidden = view !== "stats";
|
|
1033
1103
|
$("view-changelog").hidden = view !== "changelog";
|
|
1034
1104
|
$("view-trivia").hidden = view !== "trivia";
|
|
1105
|
+
$("view-krillionwho").hidden = view !== "krillionwho";
|
|
1106
|
+
if (view === "krillionwho") openKrillionWho(); else window.KrillionWho?.leave();
|
|
1107
|
+
|
|
1035
1108
|
if (view !== "trivia") { // leaving: stop the clock, close any puzzle site, and a half-done quiz starts over next time
|
|
1036
1109
|
stopTriviaTimer();
|
|
1037
1110
|
closeTriviaSite();
|
|
@@ -1048,10 +1121,40 @@
|
|
|
1048
1121
|
track(view[0].toUpperCase() + view.slice(1));
|
|
1049
1122
|
document.querySelectorAll(".rail-btn[data-nav]").forEach((b) =>
|
|
1050
1123
|
b.classList.toggle("active", b.dataset.nav === (location.hash === "#recent" ? "recent" : view)));
|
|
1051
|
-
if (view === "games") { renderRecent();
|
|
1124
|
+
if (view === "games") { renderRecent(); renderDiveBanner(); if (gridStale) { gridStale = false; renderGrid(); } }
|
|
1052
1125
|
if (location.hash === "#recent") requestAnimationFrame(() => els.recentBlock.scrollIntoView({ block: "start" }));
|
|
1053
1126
|
}
|
|
1054
|
-
function play(id) {
|
|
1127
|
+
function play(id) {
|
|
1128
|
+
const game = byId.get(id);
|
|
1129
|
+
if (game && game.section) { go(game.section); return; }
|
|
1130
|
+
location.hash = `#play/${encodeURIComponent(id)}`;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
// ---------- KrillionWho: the site's own rare-answer game, in its own section ----------
|
|
1134
|
+
// Its code, answer list and styles (krillionwho.js, krillionwho-data.js, krillionwho.css) load the first time the section opens.
|
|
1135
|
+
let kwLoad = null, kwNext = null; // kwNext: what to open once it's ready ("daily" or "play"), from the Daily Dive banner on Games
|
|
1136
|
+
function openKrillionWho() {
|
|
1137
|
+
const then = () => { const action = kwNext; kwNext = null; if (action) window.KrillionWho.open(action); };
|
|
1138
|
+
if (kwLoad) { kwLoad.then((ok) => { if (ok) { window.KrillionWho.enter(); then(); } }); return; }
|
|
1139
|
+
const css = document.createElement("link");
|
|
1140
|
+
css.rel = "stylesheet";
|
|
1141
|
+
css.href = "krillionwho.css";
|
|
1142
|
+
const styled = new Promise((ok) => { css.onload = ok; css.onerror = ok; }); // the scene measures itself, so its styles go in first
|
|
1143
|
+
document.head.appendChild(css);
|
|
1144
|
+
kwLoad = Promise.all([styled, loadScript("krillionwho-data.js").then(() => loadScript("krillionwho.js"))]).then(() => {
|
|
1145
|
+
window.KrillionWho.mount($("kw-root"), {
|
|
1146
|
+
store, getFirebase, maskSlurs, toast, track,
|
|
1147
|
+
user: (app) => app.auth().currentUser || ensureUser(app),
|
|
1148
|
+
});
|
|
1149
|
+
then();
|
|
1150
|
+
return true;
|
|
1151
|
+
}).catch((err) => {
|
|
1152
|
+
console.error(err);
|
|
1153
|
+
kwLoad = null;
|
|
1154
|
+
$("kw-root").innerHTML = `<p class="trivia-help">Couldn't load KrillionWho. Check your connection and try again.</p>`;
|
|
1155
|
+
return false;
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1055
1158
|
// instant: switch right away, no slide (used when typing on the home search moves you to Games,
|
|
1056
1159
|
// so the Games search box can take focus before the next key arrives)
|
|
1057
1160
|
// This page's own address. Inside the .svg version a <base> tag points relative links at the package folder,
|
|
@@ -1111,13 +1214,25 @@
|
|
|
1111
1214
|
// Newest first. Add an entry here with every publish; its version should match package.json.
|
|
1112
1215
|
// Each has: new (features), games (added/removed/fixed games), fixes (bugs). Leave a list out if empty.
|
|
1113
1216
|
const CHANGELOG = [
|
|
1217
|
+
{ version: "1.0.53", date: "2026-12-02",
|
|
1218
|
+
new: ["๐ก New game: KrillionWho, our own rare-answer game with its own page in the side bar and a tile on Games. Name the rarest answer you can: the rarer it is, the deeper your krill sinks",
|
|
1219
|
+
"๐ The Daily Dive: 7 prompts, 25 seconds each, the same for everyone, once a day. See how you did against everyone else today, keep a daily streak, and climb today's leaderboard",
|
|
1220
|
+
"โ Free Play: unlimited dives, themed packs (Geography, Sports, Movies & TV, Gaming, Science & nature, Food, School & everyday) and the last week of Daily Dives",
|
|
1221
|
+
"๐ก Puffer Party: pass the pufferfish before it pops! Make a room and share the code, use Quick play to find a game, or play against the computer",
|
|
1222
|
+
"โ๏ธ Misspell an answer and KrillionWho asks \"Did you meanโฆ?\" before it counts, and answers that don't fit the prompt aren't sent",
|
|
1223
|
+
"๐ฎ The Daily Dive now sits at the top of Games: play today's, or see that you already did with your streak"] },
|
|
1224
|
+
{ version: "1.0.52", date: "2026-11-30",
|
|
1225
|
+
new: ["๐ Christmas theme is now live from the day after Thanksgiving through December 26, with a live countdown to Christmas Day", "๐๏ธ New Christmas scene: snowy mountains, pine forests, a log cabin with lit windows, a decorated tree with presents and a North Pole sign", "โ๏ธ Snow now falls in front of the logo", "๐ฎ 4 new games: Getting Over It with Bennett Foddy, FNAF 4, Cat Mario and Spider Solitaire"],
|
|
1226
|
+
fixes: ["๐ Crossy Road works again: it now runs the official version, smooth and responsive", "Removed 15 duplicate games (Slope, Run 2, Temple Run 2, Flappy Bird, Geometry Dash, Moto X3M Pool Party, Ragdoll Archers, Time Shooter 2, Space Waves, Crossy Road, Idle Dice, Dreadhead Parkour, Super Mario 63, Super Mario 64, Bloons TD 4)"] },
|
|
1114
1227
|
{ version: "1.0.48", date: "2026-11-16",
|
|
1115
1228
|
new: [], fixes: ["The \"in chat right now\" count no longer gets stuck: people who close the chat or lose connection drop off within a couple of minutes"] },
|
|
1116
1229
|
{ version: "1.0.47", date: "2026-11-16",
|
|
1117
1230
|
new: ["๐ด New theme: Vice, a pastel waterfront inspired by GTA 6, with boats, birds, clouds and a busy causeway. It's on for everyone during GTA 6 launch week", "โณ A GTA 6 countdown on the home page, with fireworks on launch day (November 19)", "๐ฅ The Games page now lists the most played games first (switch to AโZ in the sort menu)", "๐ฎ 29 new games, including Freddy Fazbear's Pizzeria Simulator, Evolve, Trimps, Synergism, Shark Game, A Dark Room, Going Balls and RigBMX"], fixes: ["Fixed big games getting stuck on loading forever (Angry Birds, Retro Bowl College, Vex X3M and more): when the main download server stalls, the site now switches to a backup within seconds", "Fixed games that got stuck partway through loading their own files (Build a Queen and other 3D games)", "Gladi Hoppers and Choppy Orc have their real pictures", "2048 Merge Run was removed: its game files were deleted by their owner"] },
|
|
1231
|
+
{ version: "1.0.51", date: "2026-11-17",
|
|
1232
|
+
fixes: ["Removed 4 games that didn't work: Pokemon Emerald, Pokemon FireRed, GTA III, Amaze"] },
|
|
1118
1233
|
{ version: "1.0.50", date: "2026-11-17",
|
|
1119
1234
|
new: ["๐ New \"Recently added\" strip on the Games page shows this release's additions at a glance"],
|
|
1120
|
-
games: ["Added
|
|
1235
|
+
games: ["Added 40 fan remakes from the gn-math catalog, including Papers Please, Dreadhead Parkour, Celeste, Cuphead, Hollow Knight + Silksong, Super Mario 64, Zelda OoT, Terraria, Stardew Valley, Doom 2/3, Wolfenstein 3D, Half-Life, Pokemon Red/HeartGold, Geometry Dash, Minecraft 1.21.4, Slope, Idle Dice, Time Shooter 2 and more"],
|
|
1121
1236
|
fixes: ["Removed the Chat Bot AI game"] },
|
|
1122
1237
|
{ version: "1.0.45", date: "2026-11-13",
|
|
1123
1238
|
new: ["New game: 60 Seconds! Reatomized"], fixes: ["The whole site is faster and smoother, especially on Chromebooks: less work in the background on every page, and much smoother scrolling on the Games page", "The Google Classroom loading screen was removed", "The AI chat was removed"] },
|
|
@@ -3239,7 +3354,7 @@
|
|
|
3239
3354
|
{ id: "globle", name: "Globle", icon: "๐", url: "https://globle-game.com/", desc: "Find the mystery country on the globe", embed: true },
|
|
3240
3355
|
{ id: "grid-football", name: "Immaculate Grid: Football", icon: "๐", url: "https://www.sports-reference.com/immaculate-grid/football/", desc: "Name players who fit the row and column" },
|
|
3241
3356
|
{ id: "grid-baseball", name: "Immaculate Grid: Baseball", icon: "โพ", url: "https://www.sports-reference.com/immaculate-grid/", desc: "The baseball version" },
|
|
3242
|
-
{ id: "
|
|
3357
|
+
{ id: "krillionwho", name: "KrillionWho", icon: "๐ก", go: "krillionwho", logo: "logos/krillionwho.svg", desc: "Our own Krillion: name the rarest answer you can" },
|
|
3243
3358
|
{ id: "wordle", name: "Wordle", icon: "๐จ", url: "https://www.nytimes.com/games/wordle/index.html", desc: "The daily five-letter word" },
|
|
3244
3359
|
{ id: "connections", name: "Connections (NYT)", icon: "๐ช", url: "https://www.nytimes.com/games/connections", desc: "Sort 16 words into 4 groups" },
|
|
3245
3360
|
];
|
|
@@ -3266,12 +3381,13 @@
|
|
|
3266
3381
|
}
|
|
3267
3382
|
function renderTriviaSites() {
|
|
3268
3383
|
// the ones that play here first
|
|
3269
|
-
$("trivia-sites").innerHTML = [...TRIVIA_SITES].sort((a, b) => !!b.embed - !!a.embed).map((s) => `<button class="trivia-site" type="button" data-site="${s.id}">` +
|
|
3270
|
-
`<span class="trivia-site-art"><img src="logos/trivia-${s.id}.webp" alt="" loading="lazy" decoding="async" onerror="this.remove()"></span>` +
|
|
3384
|
+
$("trivia-sites").innerHTML = [...TRIVIA_SITES].sort((a, b) => !!b.go - !!a.go || !!b.embed - !!a.embed).map((s) => `<button class="trivia-site" type="button" data-site="${s.id}">` +
|
|
3385
|
+
`<span class="trivia-site-art"><img src="${s.logo || `logos/trivia-${s.id}.webp`}" alt="" loading="lazy" decoding="async" onerror="this.remove()"></span>` +
|
|
3271
3386
|
`<span class="trivia-site-text"><b>${escapeHtml(s.name)}</b><small>${escapeHtml(s.desc)}</small></span>` +
|
|
3272
|
-
`<span class="trivia-site-how">${s.embed ? "Play" : "New tab โ"}</span></button>`).join("");
|
|
3387
|
+
`<span class="trivia-site-how">${s.embed || s.go ? "Play" : "New tab โ"}</span></button>`).join("");
|
|
3273
3388
|
}
|
|
3274
3389
|
function openTriviaSite(site) {
|
|
3390
|
+
if (site.go) { go(site.go); return; } // one of the site's own games
|
|
3275
3391
|
if (!site.embed) { window.open(site.url, "_blank", "noopener"); return; }
|
|
3276
3392
|
stopTriviaTimer();
|
|
3277
3393
|
$("trivia-home").hidden = true;
|
|
@@ -3521,6 +3637,7 @@
|
|
|
3521
3637
|
["#home-search", "Search", "Start typing to find any game. Press / from anywhere to jump here."],
|
|
3522
3638
|
[".rail-btn[data-nav=games]", "Games", "Every game, by category. There's a Game of the day and the most played games at the top."],
|
|
3523
3639
|
[".rail-btn[data-nav=trivia]", "Trivia", "Quick quizzes, NFL, NBA and MLB team trivia, and a daily challenge with a leaderboard."],
|
|
3640
|
+
[".rail-btn[data-nav=krillionwho]", "KrillionWho", "Our daily rare-answer game: the rarer your answer, the deeper you dive. Plus Puffer Party with friends."],
|
|
3524
3641
|
["#soundboard-btn", "Soundboard", "Meme sounds and effects, one click away."],
|
|
3525
3642
|
[".rail-btn[data-nav=chat]", "Chat", "Talk with everyone on the site. Be nice, and you can post polls too."],
|
|
3526
3643
|
["#panic-btn", "Panic button", "Jumps straight to Google Classroom. The ` and ] keys do it too."],
|