@ywkrlerche/richardwho 1.0.49 → 1.0.52

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
@@ -474,7 +474,7 @@
474
474
  for (const h of HOLIDAYS) root.classList.toggle(h, t === h);
475
475
  root.classList.toggle("fest", !!FESTS[t]);
476
476
  root.classList.toggle("holiday", HOLIDAYS.includes(t)); // shared touches on every page (style.css)
477
- $("theme-color").content = { white: "#f6f6f8", halloween: "#110820", christmas: "#0b1424" }[t] || FESTS[t]?.color || "#000000";
477
+ $("theme-color").content = { white: "#f6f6f8", halloween: "#110820", christmas: "#071a33" }[t] || FESTS[t]?.color || "#000000";
478
478
  if (t === "halloween" && !document.querySelector(".spooky")) buildHalloween(); // scenery is only drawn once it's needed
479
479
  if (t === "christmas" && !document.querySelector(".xmas")) buildChristmas();
480
480
  if (FESTS[t]) buildFest(t);
@@ -667,16 +667,66 @@
667
667
  };
668
668
 
669
669
  function buildChristmas() {
670
- const colors = ["#ef4444", "#facc15", "#22c55e", "#3b82f6"];
671
- const bulbs = Array.from({ length: 26 }, (_, i) => `<i style="left:${(i + .5) * (100 / 26)}%;top:${10 + Math.sin(i * 1.3) * 5}px;--c:${colors[i % 4]};animation-delay:${(i % 5) * -.45}s"></i>`).join("");
672
- const tree = (x, h) => `<path d="M${x} ${200 - h}l${h * .32} ${h * .45}h-${h * .12}l${h * .22} ${h * .3}h-${h * .1}l${h * .25} ${h * .25}h-${h * 1.34}l${h * .25}-${h * .25}h-${h * .1}l${h * .22}-${h * .3}h-${h * .12}Z"/>`;
670
+ const rnd = (i, k) => Math.abs(Math.sin(i * 12.99 + k * 78.23) * 43758.55) % 1; // same treeline every visit
671
+ const treeline = (base, h, step, k) => {
672
+ let d = `M0 600V${base}`;
673
+ 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}`;
674
+ return d + "V600H0Z";
675
+ };
676
+ const pine = (w) => Array.from({ length: 6 }, (_, t) => {
677
+ const y = 20 + t * 55, hw = (30 + t * 17) * w;
678
+ 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`;
679
+ }).join("");
680
+ const sidePines = `<path fill="#b9cbe0" d="${pine(1)}"/><path fill="#edf3fa" d="${pine(.72)}"/><path d="M93 345h14v55H93Z" fill="#3b2a20"/>`;
681
+ const tier = (i) => {
682
+ const t = 30 + i * 48, b = t + 80, hw = 40 + i * 22;
683
+ 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"/>`;
684
+ };
685
+ 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(" ");
686
+ 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"]]
687
+ .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("");
688
+ 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("");
689
+ 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"/>`;
690
+ 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("");
691
+ const stripes = Array.from({ length: 8 }, (_, i) => `<path d="M54 ${66 + i * 17}l12-7v8l-12 7Z" fill="#dc2626"/>`).join("");
673
692
  $("view-home").insertAdjacentHTML("afterbegin", `<div class="xmas" aria-hidden="true">
674
- <div class="lights"><svg viewBox="0 0 100 10" preserveAspectRatio="none"><path d="M0 2Q8 9 16 3T32 3 48 3 64 3 80 3 100 3"/></svg>${bulbs}</div>
675
- <svg class="hills" viewBox="0 0 1600 240" preserveAspectRatio="xMidYMax slice">
676
- <g class="pines">${tree(120, 120)}${tree(230, 80)}${tree(1380, 140)}${tree(1500, 90)}</g>
677
- <path class="snowbank" d="M0 200C200 170 420 190 640 180S1100 165 1300 182 1520 186 1600 176V240H0Z"/>
693
+ <svg class="scene" viewBox="0 0 1600 600" preserveAspectRatio="xMidYMax slice">
694
+ <path d="M150 600L470 150L800 600Z" fill="#123f6e"/><path d="M470 150L800 600H600L560 470L585 400L530 300L505 215Z" fill="#1b5689"/>
695
+ <path d="M880 600L1230 165L1580 600Z" fill="#123f6e"/><path d="M1230 165L1580 600H1390L1350 480L1375 390L1300 280L1265 210Z" fill="#1b5689"/>
696
+ <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"/>
697
+ <path d="M0 545C260 505 520 525 760 560S1250 530 1600 515V600H0Z" fill="#c4d4e6"/>
698
+ <path d="M0 580C300 545 560 575 900 590S1400 560 1600 570V600H0Z" fill="#e8f0f8"/>
699
+ </svg>
700
+ <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>
701
+ <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>
702
+ <svg class="cabin" viewBox="0 0 320 205">
703
+ <rect x="222" y="28" width="18" height="50" fill="#3b2a20"/><rect x="218" y="24" width="26" height="8" rx="3" fill="#edf3fa"/>
704
+ <rect x="40" y="96" width="240" height="104" fill="#8a5a2e"/>${logs}
705
+ <path d="M48 98L160 38L272 98Z" fill="#7a4e27"/>
706
+ <circle cx="160" cy="74" r="13" fill="#fcd34d" stroke="#5b3a1e" stroke-width="5" class="glow"/>
707
+ <path d="M24 100L160 24L296 100L286 108L160 38L34 108Z" fill="#5b3a1e"/>
708
+ <path d="M20 98L160 18L300 98Q296 104 290 102L160 30L30 102Q22 104 20 98Z" fill="#edf3fa"/>
709
+ <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"/>
710
+ <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"/>
711
+ <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"/>
712
+ <ellipse cx="160" cy="202" rx="160" ry="8" fill="#e8f0f8"/>
713
+ </svg>
714
+ <svg class="xtree" viewBox="0 0 220 300">
715
+ <rect x="100" y="246" width="20" height="24" fill="#5b3a1e"/>
716
+ ${[0, 1, 2, 3].map(tier).join("")}
717
+ <path d="M80 100Q112 118 142 96M66 150Q112 172 156 146M52 200Q112 226 170 196" stroke="#facc15" stroke-width="2" fill="none" opacity=".75"/>
718
+ ${ornaments}
719
+ <g class="tw a" fill="#fde68a">${twinkles(1)}</g><g class="tw b" fill="#fde68a">${twinkles(2)}</g>
720
+ <polygon points="${star}" fill="#facc15" class="glow"/>
721
+ ${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")}
722
+ </svg>
723
+ <svg class="sign" viewBox="0 0 120 200">
724
+ <rect x="54" y="40" width="12" height="160" fill="#f8fafc"/>${stripes}
725
+ <path d="M50 42Q60 22 70 42Z" fill="#edf3fa"/>
726
+ <rect x="6" y="62" width="108" height="34" rx="4" fill="#7c4a22" stroke="#5b3a1e" stroke-width="3"/>
727
+ <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"/>
728
+ <text x="60" y="86" text-anchor="middle" font-size="13" font-weight="800" fill="#fde68a" letter-spacing="1">NORTH POLE</text>
678
729
  </svg>
679
- <span class="xmas-tree">🎄</span><span class="gift g1">🎁</span><span class="gift g2">🎁</span>
680
730
  <svg class="snowman" viewBox="0 0 100 150">
681
731
  <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"/>
682
732
  <circle cx="50" cy="114" r="32" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
@@ -1014,6 +1064,7 @@
1014
1064
  $("view-stats").hidden = view !== "stats";
1015
1065
  $("view-changelog").hidden = view !== "changelog";
1016
1066
  $("view-trivia").hidden = view !== "trivia";
1067
+
1017
1068
  if (view !== "trivia") { // leaving: stop the clock, close any puzzle site, and a half-done quiz starts over next time
1018
1069
  stopTriviaTimer();
1019
1070
  closeTriviaSite();
@@ -1093,10 +1144,19 @@
1093
1144
  // Newest first. Add an entry here with every publish; its version should match package.json.
1094
1145
  // Each has: new (features), games (added/removed/fixed games), fixes (bugs). Leave a list out if empty.
1095
1146
  const CHANGELOG = [
1147
+ { version: "1.0.52", date: "2026-11-30",
1148
+ 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"],
1149
+ 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)"] },
1096
1150
  { version: "1.0.48", date: "2026-11-16",
1097
1151
  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"] },
1098
1152
  { version: "1.0.47", date: "2026-11-16",
1099
1153
  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"] },
1154
+ { version: "1.0.51", date: "2026-11-17",
1155
+ fixes: ["Removed 4 games that didn't work: Pokemon Emerald, Pokemon FireRed, GTA III, Amaze"] },
1156
+ { version: "1.0.50", date: "2026-11-17",
1157
+ new: ["🆕 New \"Recently added\" strip on the Games page shows this release's additions at a glance"],
1158
+ 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"],
1159
+ fixes: ["Removed the Chat Bot AI game"] },
1100
1160
  { version: "1.0.45", date: "2026-11-13",
1101
1161
  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"] },
1102
1162
  { version: "1.0.44", date: "2026-11-12",
package/config.js CHANGED
@@ -44,4 +44,5 @@ window.RUG_CONFIG = {
44
44
  // For local testing only: send the database to Firebase's local emulator, e.g. "127.0.0.1:9000",
45
45
  // so new rules can be tried without touching the real chat. Leave null when published.
46
46
  firebaseEmulator: null,
47
+
47
48
  };