@ywkrlerche/richardwho 1.0.32 → 1.0.33
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 +58 -2
- package/index.html +12 -0
- package/package.json +1 -1
- package/style.css +17 -1
package/app.js
CHANGED
|
@@ -394,10 +394,11 @@
|
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
// ---------- Routing: "" home, #games, #recent, #play/<id> ----------
|
|
397
|
-
const VIEW_ORDER = ["home", "games", "chat", "stats", "settings"];
|
|
397
|
+
const VIEW_ORDER = ["home", "games", "chat", "stats", "settings", "changelog"];
|
|
398
398
|
let lastView = null;
|
|
399
399
|
function viewFor(hash) {
|
|
400
|
-
return hash === "#games" || hash === "#recent" ? "games" : hash === "#settings" ? "settings" : hash === "#chat" ? "chat"
|
|
400
|
+
return hash === "#games" || hash === "#recent" ? "games" : hash === "#settings" ? "settings" : hash === "#chat" ? "chat"
|
|
401
|
+
: hash === "#stats" ? "stats" : hash === "#changelog" ? "changelog" : "home";
|
|
401
402
|
}
|
|
402
403
|
// Switching pages: the old page slides out while the new one slides in (down the side bar = upward,
|
|
403
404
|
// up the side bar = downward). Uses the browser's view transitions; older browsers just switch.
|
|
@@ -435,6 +436,8 @@
|
|
|
435
436
|
$("view-chat").hidden = view !== "chat";
|
|
436
437
|
lastView = view;
|
|
437
438
|
$("view-stats").hidden = view !== "stats";
|
|
439
|
+
$("view-changelog").hidden = view !== "changelog";
|
|
440
|
+
if (view === "changelog") renderChangelog();
|
|
438
441
|
placeChatBox();
|
|
439
442
|
if (view === "settings") { renderSettings(); renderAdmin(); }
|
|
440
443
|
if (view === "stats") renderStats();
|
|
@@ -499,6 +502,58 @@
|
|
|
499
502
|
applyTheme(document.documentElement.dataset.theme === "dark" ? "light" : "dark"));
|
|
500
503
|
}
|
|
501
504
|
|
|
505
|
+
// ---------- What's new (changelog) ----------
|
|
506
|
+
// Newest first. Add an entry here with every publish; its version should match package.json.
|
|
507
|
+
// Each has: new (features), games (added/removed/fixed games), fixes (bugs). Leave a list out if empty.
|
|
508
|
+
const CHANGELOG = [
|
|
509
|
+
{ version: "1.0.33", date: "2026-10-23",
|
|
510
|
+
new: ["What's new page: see every update, new games and bug fixes (you're on it!)"] },
|
|
511
|
+
{ version: "1.0.32", date: "2026-10-23",
|
|
512
|
+
new: ["Phone browsers now match the site's color at the top of the screen", "Keyboard users get a “Skip to content” button on the first Tab press"],
|
|
513
|
+
fixes: ["Search boxes and game tiles show a clear ring when picked with the keyboard",
|
|
514
|
+
"Scrolling to the end of chat or a pop-up no longer scrolls the page behind it",
|
|
515
|
+
"Taps on touch screens respond right away (no double-tap zoom delay)",
|
|
516
|
+
"The green online dot stops pulsing when your device is set to reduce motion"] },
|
|
517
|
+
{ version: "1.0.31", date: "2026-10-23",
|
|
518
|
+
games: ["Fixed Recoil: now runs a working copy", "Fixed Gunspin: now runs a working copy",
|
|
519
|
+
"Removed Five Nights at Epstein's and Get Yoked (they relied on sites that schools block)"] },
|
|
520
|
+
{ version: "1.0.30", date: "2026-10-23",
|
|
521
|
+
new: ["Chat beside your game: hit 💬 Chat in the game bar", "A dot on the chat button when someone posts",
|
|
522
|
+
"@mentions: type @name to ping someone (their dot turns pink)", "See when someone is typing",
|
|
523
|
+
"Delete your own chat messages with 🗑", "⚠ Report a broken game, or request a new one from the Games page",
|
|
524
|
+
"Pages slide when you switch between them", "Drag-to-bookmark button and a ⟳ Latest version button on the home page"],
|
|
525
|
+
games: ["Tested all 840 games; removed 48 that only showed a blank screen"],
|
|
526
|
+
fixes: ["Opening the Games page is much smoother"] },
|
|
527
|
+
{ version: "1.0.29", new: ["Stats & achievements page (🏆 in the side bar)", "New blue look and an animated logo that reacts to your mouse"] },
|
|
528
|
+
{ version: "Earlier", new: ["Settings page, tab disguises and panic button", "Random game wheel", "Live online count and the chat room",
|
|
529
|
+
"Funny loading screen", "Recently played and search", "The site updates itself to the newest version"],
|
|
530
|
+
games: ["Hundreds of games added, including a second big collection"],
|
|
531
|
+
fixes: ["Games that said “failed to fetch” now retry backup servers", "Games can no longer kick you back out of the player"] },
|
|
532
|
+
];
|
|
533
|
+
const SITE_VERSION = CHANGELOG[0].version;
|
|
534
|
+
const CHANGELOG_SEEN_KEY = "rug-changelog-seen";
|
|
535
|
+
const CHANGE_KINDS = [["new", "✨ Updates"], ["games", "🎮 Games"], ["fixes", "🐛 Bug fixes"]];
|
|
536
|
+
function renderChangelog() {
|
|
537
|
+
const fmt = new Intl.DateTimeFormat(undefined, { month: "short", day: "numeric", year: "numeric" });
|
|
538
|
+
$("changelog-list").innerHTML = CHANGELOG.map((c, i) => {
|
|
539
|
+
const date = c.date ? `<span class="cl-date">${fmt.format(new Date(c.date + "T12:00:00"))}</span>` : "";
|
|
540
|
+
const tag = i === 0 ? `<span class="cl-latest">Latest</span>` : "";
|
|
541
|
+
const lists = CHANGE_KINDS.filter(([k]) => c[k]?.length).map(([k, label]) =>
|
|
542
|
+
`<div class="cl-kind cl-${k}"><h3>${label}</h3><ul>${c[k].map((x) => `<li>${escapeHtml(x)}</li>`).join("")}</ul></div>`).join("");
|
|
543
|
+
return `<article class="set-group cl-entry"><h2>${/\d/.test(c.version) ? "v" : ""}${escapeHtml(c.version)} ${tag}${date}</h2>${lists}</article>`;
|
|
544
|
+
}).join("");
|
|
545
|
+
store.set(CHANGELOG_SEEN_KEY, SITE_VERSION);
|
|
546
|
+
$("whats-new-link").classList.remove("has-unread");
|
|
547
|
+
}
|
|
548
|
+
function initChangelog() {
|
|
549
|
+
$("home-version").textContent = `v${SITE_VERSION}`;
|
|
550
|
+
$("set-version").textContent = `v${SITE_VERSION}`;
|
|
551
|
+
// A dot on the home link until you've looked at this version's notes (not on your very first visit)
|
|
552
|
+
const seen = store.get(CHANGELOG_SEEN_KEY, null);
|
|
553
|
+
if (seen === null) store.set(CHANGELOG_SEEN_KEY, SITE_VERSION);
|
|
554
|
+
else if (seen !== SITE_VERSION) $("whats-new-link").classList.add("has-unread");
|
|
555
|
+
}
|
|
556
|
+
|
|
502
557
|
// ---------- Play stats + achievements (saved in this browser) ----------
|
|
503
558
|
// Time counts only while a game is open AND the tab is visible.
|
|
504
559
|
const STATS_KEY = "rug-stats";
|
|
@@ -1665,6 +1720,7 @@
|
|
|
1665
1720
|
bindSettings();
|
|
1666
1721
|
bindWheel();
|
|
1667
1722
|
bindWordmark();
|
|
1723
|
+
initChangelog();
|
|
1668
1724
|
$("chat-form").addEventListener("submit", sendChat);
|
|
1669
1725
|
$("chat-text").addEventListener("input", noteTyping);
|
|
1670
1726
|
$("chat-text").addEventListener("blur", stopTyping);
|
package/index.html
CHANGED
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
<button class="bookmark-chip latest" type="button" id="latest-btn" title="Open the newest version of the site">⟳ Latest version</button>
|
|
95
95
|
<span class="bookmark-hint"><span class="bookmark-arrow" aria-hidden="true">↑</span> Drag richardwho to your bookmarks bar to get back fast</span>
|
|
96
96
|
</div>
|
|
97
|
+
<p class="whats-new-row"><button class="text-btn link whats-new" type="button" data-nav="changelog" id="whats-new-link">What's new in <span id="home-version"></span></button></p>
|
|
97
98
|
</section>
|
|
98
99
|
|
|
99
100
|
<!-- GAMES -->
|
|
@@ -191,6 +192,12 @@
|
|
|
191
192
|
</section>
|
|
192
193
|
|
|
193
194
|
<!-- SETTINGS -->
|
|
195
|
+
<!-- WHAT'S NEW (filled from CHANGELOG in app.js) -->
|
|
196
|
+
<section id="view-changelog" class="view settings changelog" hidden>
|
|
197
|
+
<header class="games-head"><div><h1>What's new</h1><p class="lede">Every update to richardwho: new stuff, games and fixes.</p></div></header>
|
|
198
|
+
<div id="changelog-list"></div>
|
|
199
|
+
</section>
|
|
200
|
+
|
|
194
201
|
<section id="view-settings" class="view settings" hidden>
|
|
195
202
|
<header class="games-head"><div><h1>Settings</h1><p class="lede">Saved on this device only.</p></div></header>
|
|
196
203
|
|
|
@@ -250,6 +257,11 @@
|
|
|
250
257
|
</div>
|
|
251
258
|
</div>
|
|
252
259
|
|
|
260
|
+
<div class="set-group">
|
|
261
|
+
<h2>About</h2>
|
|
262
|
+
<div class="set-row"><span>Version <strong id="set-version"></strong></span><button class="pill-btn" type="button" data-nav="changelog">What's new</button></div>
|
|
263
|
+
</div>
|
|
264
|
+
|
|
253
265
|
<div class="set-group">
|
|
254
266
|
<h2>Your data</h2>
|
|
255
267
|
<div class="set-row"><span>Recently played</span><button class="pill-btn" type="button" id="set-clear-recent">Clear</button></div> <div class="set-row"><span>All settings</span><button class="pill-btn danger" type="button" id="set-reset">Reset to default</button></div>
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -466,7 +466,23 @@ body.playing { overflow: hidden; }
|
|
|
466
466
|
body:has(#view-games:not([hidden])) .corner-links,
|
|
467
467
|
body:has(#view-stats:not([hidden])) .corner-links,
|
|
468
468
|
body:has(#view-settings:not([hidden])) .corner-links,
|
|
469
|
-
body:has(#view-chat:not([hidden])) .corner-links
|
|
469
|
+
body:has(#view-chat:not([hidden])) .corner-links,
|
|
470
|
+
body:has(#view-changelog:not([hidden])) .corner-links { display: none; }
|
|
471
|
+
|
|
472
|
+
/* What's new */
|
|
473
|
+
.changelog { max-width: 760px; }
|
|
474
|
+
.cl-entry h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 20px; text-wrap: balance; }
|
|
475
|
+
.cl-latest { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 3px; background: var(--glow-cyan, #22d3ee); color: #000; }
|
|
476
|
+
.cl-date { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
|
|
477
|
+
.cl-kind { margin-top: 12px; }
|
|
478
|
+
.cl-kind h3 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
|
|
479
|
+
.cl-kind ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; line-height: 1.45; }
|
|
480
|
+
.cl-games li::marker { color: #4ade80; }
|
|
481
|
+
.cl-fixes li::marker { color: #f472b6; }
|
|
482
|
+
.cl-new li::marker { color: var(--glow-cyan, #22d3ee); }
|
|
483
|
+
.whats-new-row { text-align: center; margin: 14px 0 0; font-size: 13px; }
|
|
484
|
+
.whats-new { position: relative; padding-right: 14px !important; }
|
|
485
|
+
.whats-new.has-unread::after { top: 0; right: 0; width: 7px; height: 7px; }
|
|
470
486
|
|
|
471
487
|
/* ---------- Responsive ---------- */
|
|
472
488
|
@media (max-width: 1100px) { .grid, .recent-row { grid-template-columns: repeat(min(var(--per-row), 4), minmax(0, 1fr)); } }
|