@ywkrlerche/richardwho 1.0.40 β†’ 1.0.42

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 CHANGED
@@ -836,6 +836,10 @@
836
836
  // Newest first. Add an entry here with every publish; its version should match package.json.
837
837
  // Each has: new (features), games (added/removed/fixed games), fixes (bugs). Leave a list out if empty.
838
838
  const CHANGELOG = [
839
+ { version: "1.0.42", date: "2026-11-10",
840
+ new: ["The site also opens as an .svg link, for places where the normal link is blocked: find it on the home page and the Games page"], fixes: [] },
841
+ { version: "1.0.41", date: "2026-11-03",
842
+ new: [], fixes: ["Fixed the page turning white after a while (mostly on Chromebooks), like in the chat"] },
839
843
  { version: "1.0.40", date: "2026-10-30",
840
844
  new: ["Send videos in chat: from your computer (πŸ“·) or record one with the camera (πŸ“Έ)", "Voice notes in chat (🎀)", "πŸ”Š Soundboard: Kawhi Leonard's laugh, and sort by Popular or My most used", "πŸŽ‰ Holiday themes switch by themselves: New Year's, Valentine's Day, St. Patrick's Day, Easter, Fourth of July, Halloween, Thanksgiving and Christmas", "🎨 Theme setting is now Holiday, Black or White", "❄️ Christmas: snow you can push around and click, and a snowman"],
841
845
  fixes: ["The home page is cleaner and fits small Chromebook screens", "Animated stickers were removed", "The Christmas lights are no longer hidden behind the quote of the day"] },
@@ -1101,8 +1105,17 @@
1101
1105
 
1102
1106
  // Home page bookmark chip: the no-version link, which unpkg always sends to the newest version
1103
1107
  const LATEST_URL = `https://unpkg.com/${CFG.npmPackage || "@ywkrlerche/richardwho"}/index.html`;
1108
+ // The same site also opens as an .svg (index.svg loads this page inside itself). Each version links to the other.
1109
+ const SVG_URL = `https://unpkg.com/${CFG.npmPackage || "@ywkrlerche/richardwho"}/index.svg`;
1110
+ const VIA_SVG = (() => { try { return window.parent !== window && /\.svg$/i.test(window.parent.location.pathname); } catch { return false; } })();
1104
1111
  function renderBookmark() {
1105
- $("bookmark-link").href = LATEST_URL;
1112
+ $("bookmark-link").href = VIA_SVG ? SVG_URL : LATEST_URL;
1113
+ for (const id of ["alt-link-home", "alt-link-games"]) {
1114
+ const a = $(id);
1115
+ a.href = VIA_SVG ? LATEST_URL : SVG_URL;
1116
+ a.textContent = VIA_SVG ? "πŸ”— Normal link" : "πŸ”— NEW VERSION OF SITE";
1117
+ a.title = VIA_SVG ? "Open the regular version of the site" : "Open the site as an .svg, for when the normal link is blocked";
1118
+ }
1106
1119
  $("bookmark-name").textContent = "richardwho";
1107
1120
  $("bookmark-icon").src = REAL_ICON;
1108
1121
  }
@@ -1707,7 +1720,10 @@
1707
1720
  return n.error || n.name.toLowerCase() === ADMIN_NAME.toLowerCase() ? null : n.name;
1708
1721
  }
1709
1722
  function startTypingWatch(db) {
1710
- db.ref(".info/serverTimeOffset").on("value", (s) => { typing.offset = s.val() || 0; });
1723
+ if (!typing.offsetWatched) { // once: this runs again on every reconnect and room switch
1724
+ typing.offsetWatched = true;
1725
+ db.ref(".info/serverTimeOffset").on("value", (s) => { typing.offset = s.val() || 0; });
1726
+ }
1711
1727
  typing.watchRef?.off();
1712
1728
  typing.others = {};
1713
1729
  typing.watchRef = db.ref(roomPath("typing"));
package/index.html CHANGED
@@ -131,6 +131,7 @@
131
131
  <!-- Dragged to the bookmarks bar, the link's text becomes the bookmark's name -->
132
132
  <a class="bookmark-chip" id="bookmark-link" href="https://unpkg.com/@ywkrlerche/richardwho/index.html" draggable="true" title="Drag me to your bookmarks bar"><img id="bookmark-icon" alt=""><span id="bookmark-name">richardwho</span></a>
133
133
  <button class="bookmark-chip latest" type="button" id="latest-btn" title="Open the newest version of the site">⟳ Latest version</button>
134
+ <a class="bookmark-chip latest alt-link" id="alt-link-home" target="_blank" rel="noopener"></a>
134
135
  </div>
135
136
  <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>
136
137
  </div>
@@ -138,7 +139,7 @@
138
139
 
139
140
  <!-- GAMES -->
140
141
  <section id="view-games" class="view games" hidden>
141
- <header class="games-head"><h1>Games</h1></header>
142
+ <header class="games-head"><h1>Games</h1><a class="bookmark-chip latest alt-link" id="alt-link-games" target="_blank" rel="noopener"></a></header>
142
143
 
143
144
  <div class="toolbar">
144
145
  <label class="search">
package/index.svg ADDED
@@ -0,0 +1,45 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
2
+ <title>Richards Unblocked Games</title>
3
+ <!--
4
+ jsDelivr serves .html as text/plain (shown as raw code) but serves .svg as image/svg+xml,
5
+ which browsers open as a real document that can run scripts. This launcher fetches
6
+ index.html from the same folder, points its relative links (style.css, app.js, games.json)
7
+ back at jsDelivr with a <base> tag, and shows it full-screen in an iframe.
8
+ -->
9
+ <style><![CDATA[
10
+ html, body, svg { margin: 0; padding: 0; width: 100%; height: 100%; background: #0b0d14; overflow: hidden; }
11
+ iframe { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; background: #0b0d14; }
12
+ .msg { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
13
+ color: #8b90ab; font: 15px system-ui, "Segoe UI", sans-serif; }
14
+ ]]></style>
15
+ <foreignObject width="100%" height="100%">
16
+ <div xmlns="http://www.w3.org/1999/xhtml" id="root" style="width:100%;height:100%">
17
+ <div class="msg" id="msg">Loading…</div>
18
+ </div>
19
+ </foreignObject>
20
+ <script><![CDATA[
21
+ (async () => {
22
+ const base = location.href.replace(/[?#].*$/, "").replace(/[^/]*$/, "");
23
+ const msg = document.getElementById("msg");
24
+ try {
25
+ const res = await fetch(base + "index.html", { cache: "no-cache" });
26
+ if (!res.ok) throw new Error("HTTP " + res.status);
27
+ let html = await res.text();
28
+ html = html.replace(/<head([^>]*)>/i, '<head$1><base href="' + base + '">');
29
+ const frame = document.createElementNS("http://www.w3.org/1999/xhtml", "iframe");
30
+ frame.setAttribute("allow", "fullscreen; autoplay; gamepad; pointer-lock");
31
+ frame.setAttribute("allowfullscreen", "");
32
+ document.getElementById("root").appendChild(frame);
33
+ // Write the page into a blank frame so it keeps this real https:// address (games need it)
34
+ const doc = frame.contentDocument;
35
+ doc.open();
36
+ doc.write(html);
37
+ doc.close();
38
+ msg.remove();
39
+ frame.contentWindow.focus();
40
+ } catch (err) {
41
+ msg.textContent = "Couldn't load the site (" + err.message + "). Try refreshing.";
42
+ }
43
+ })();
44
+ ]]></script>
45
+ </svg>
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@ywkrlerche/richardwho",
3
- "version": "1.0.40",
3
+ "version": "1.0.42",
4
4
  "description": "Richards Unblocked Games",
5
5
  "license": "UNLICENSED",
6
6
  "files": [
7
7
  "index.html",
8
+ "index.svg",
8
9
  "style.css",
9
10
  "app.js",
10
11
  "config.js",
package/style.css CHANGED
@@ -39,6 +39,7 @@
39
39
 
40
40
  * { box-sizing: border-box; }
41
41
  html, body { margin: 0; }
42
+ html { background: var(--bg); }
42
43
  body {
43
44
  min-height: 100vh; background: var(--bg); color: var(--text);
44
45
  font: 15px/1.45 var(--font); overflow-x: hidden;
@@ -700,11 +701,12 @@ html.halloween[data-theme="dark"] {
700
701
  --shine: #fdba74;
701
702
  --glow-cyan: #fb923c;
702
703
  }
703
- html.halloween[data-theme="dark"] body { background: linear-gradient(180deg, #110820 0%, #0b0613 45%, #070409 100%) fixed; }
704
+ html.halloween[data-theme="dark"], html.halloween[data-theme="dark"] body { background: #0b0613; }
704
705
  html.halloween[data-theme="dark"] .aurora {
705
706
  background:
706
707
  radial-gradient(50vw 30vh at 30vw 0, rgba(109, 40, 217, .18), transparent 70%),
707
- radial-gradient(60vw 24vh at 50vw 100vh, rgba(234, 88, 12, .07), transparent 70%);
708
+ radial-gradient(60vw 24vh at 50vw 100vh, rgba(234, 88, 12, .07), transparent 70%),
709
+ linear-gradient(180deg, #110820 0%, #0b0613 45%, #070409 100%);
708
710
  }
709
711
  /* the usual logo (same font, shine and hover), in cream with an orange-and-white shine */
710
712
  html.halloween[data-theme="dark"] .wordmark {
@@ -790,11 +792,12 @@ html.rail-peek .rail-show { display: none; }
790
792
 
791
793
  /* ---------- Christmas (December, or picked in Settings): snow, lights, pines ---------- */
792
794
  html.christmas[data-theme="dark"] { --shine: #fca5a5; --glow-cyan: #f87171; }
793
- html.christmas[data-theme="dark"] body { background: linear-gradient(180deg, #0b1424 0%, #08101c 50%, #060a12 100%) fixed; }
795
+ html.christmas[data-theme="dark"], html.christmas[data-theme="dark"] body { background: #08101c; }
794
796
  html.christmas[data-theme="dark"] .aurora {
795
797
  background:
796
798
  radial-gradient(45vw 26vh at 25vw 0, rgba(220, 38, 38, .12), transparent 70%),
797
- radial-gradient(45vw 26vh at 80vw 10vh, rgba(22, 163, 74, .12), transparent 70%);
799
+ radial-gradient(45vw 26vh at 80vw 10vh, rgba(22, 163, 74, .12), transparent 70%),
800
+ linear-gradient(180deg, #0b1424 0%, #08101c 50%, #060a12 100%);
798
801
  }
799
802
  html.christmas[data-theme="dark"] .wordmark {
800
803
  background-image:
@@ -1019,8 +1022,8 @@ html.easter { --f-bg: #160f24; --f-bg2: #0b0814; --f-a: #c4b5fd; --f-b: #f9a8d4;
1019
1022
  html.july4 { --f-bg: #070b1f; --f-bg2: #03050f; --f-a: #ef4444; --f-b: #60a5fa; --f-cream: #f8fafc; --f-glow1: rgba(239, 68, 68, .13); --f-glow2: rgba(59, 130, 246, .15); --f-on: #fff; --f-hill: #0d1330; }
1020
1023
  html.thanksgiving { --f-bg: #1a0f06; --f-bg2: #0c0703; --f-a: #f59e0b; --f-b: #ea580c; --f-cream: #fdf1dc; --f-glow1: rgba(245, 158, 11, .13); --f-glow2: rgba(180, 83, 9, .12); --f-on: #1f1203; --f-hill: #24160a; }
1021
1024
  html.fest[data-theme="dark"] { --shine: var(--f-b); --glow-cyan: var(--f-a); }
1022
- html.fest[data-theme="dark"] body { background: linear-gradient(180deg, var(--f-bg) 0%, var(--f-bg2) 100%) fixed; }
1023
- html.fest[data-theme="dark"] .aurora { background: radial-gradient(45vw 26vh at 25vw 0, var(--f-glow1), transparent 70%), radial-gradient(45vw 26vh at 80vw 10vh, var(--f-glow2), transparent 70%); }
1025
+ html.fest[data-theme="dark"], html.fest[data-theme="dark"] body { background: var(--f-bg2); }
1026
+ html.fest[data-theme="dark"] .aurora { background: radial-gradient(45vw 26vh at 25vw 0, var(--f-glow1), transparent 70%), radial-gradient(45vw 26vh at 80vw 10vh, var(--f-glow2), transparent 70%), linear-gradient(180deg, var(--f-bg) 0%, var(--f-bg2) 100%); }
1024
1027
  html.fest[data-theme="dark"] .wordmark {
1025
1028
  background-image:
1026
1029
  radial-gradient(circle var(--spot, 0px) at var(--mx, 50%) var(--my, 50%), #fff, transparent 70%),
@@ -1045,3 +1048,7 @@ html.fest[data-theme="dark"] .festive { display: block; }
1045
1048
  .fallers { left: 0; width: 100%; height: calc(100% - 56px); }
1046
1049
  .festive-prop:nth-of-type(n+3) { display: none; }
1047
1050
  }
1051
+
1052
+ /* ---------- Link to the other version of the site (.svg / normal) ---------- */
1053
+ .alt-link { text-decoration: none; color: inherit; }
1054
+ #view-games .games-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }