From a1609ebfa56bd666da8c52603b5fbba2634bbddd Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 05:17:06 +0000 Subject: [PATCH] Hide play-time hours from players; show miles instead Game play-time boards show miles (same order), rule notes and the badge guide no longer state hours, the showcase drops visitor hours. The admin page is unchanged. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- README.md | 6 +++--- e63334287a3deaa3/aisles.js | 2 +- e63334287a3deaa3/leaderboard.js | 31 ++++++++++++++++++------------- e63334287a3deaa3/miles.js | 14 +++++++------- e63334287a3deaa3/news-es.js | 2 +- e63334287a3deaa3/news.js | 2 +- showcase/index.html | 4 ++-- 7 files changed, 33 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 5ca67867..7d0cd89e 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the - `namefilter.js` (site root): the name filter. Every page where players pick a name others can see loads it with a plain `` right after `` (every Back Room game, the Back Room and phone pages, Hype Cycle Exchange, Boxed and the home page; not the admin page). `NameFilter.clean(name)` masks rude words at the start of a word after their first letter (`F***face`), the same way and with the same look-alike digits as `social.js`'s and `leaderboard.js`'s `mask`, and turns a name that hides one of the worst words some other way (`f.u.c.k`, `fuuuck`, `xfuckx`) into `Player`; clean names come back unchanged. On its own it cleans the name boxes the games use (`#name`, `#inName`, `#joinName`, `#hostName`, `#newName`, `#ptyName`, or any `input[data-name-filter]`, such as the Online name box) on load, on blur or change, and on any click, Enter or submit before the game's own handlers run, so Play, Join and Host always read a cleaned name; it doesn't change a name while it's being typed. `social.js`, `party.js`, `leaderboard.js` and `stats.js` also pass every name through it in their `cleanName`, so names other people already saved are masked where those panels show them. A new game gets it by using one of those ids for its name box (or `data-name-filter`) and adding the script tag. The word lists are stored in ROT13; the comment at the top of the file says how to add words, and which list also looks for words hidden inside names. - `e63334287a3deaa3/social.js`: Online (Back Room). An Online panel under the Party panel lists everyone who has the Back Room open, by name plus a seat tag worked out from their uid (rows 1–40, seats A–F, like `Nico · 14C`), so two people with the same name can be told apart (seats can still repeat now and then; there are 240). Each person shows as Idle, in a party (and its size), or in a game. **The list's size:** on a computer it scrolls inside a box 252 px tall, and the page carries on scrolling once the box reaches its end (it used to hold the scroll, so the mouse got stuck over a long list); on a phone (600 px wide or less) it isn't a scroll box at all, because a finger on it couldn't scroll the page past it, so it shows the first 6 people and a **Show everyone (N)** / **Show fewer** button (`PHONE_FEW` in social.js), while the Find box still searches everyone. **Redraws:** the panel's draw runs every time anyone online changes anything (each person's 15-second heartbeat included), so the list, your badge row, your name card and the open drawer are only rebuilt when what they'd show actually changed (`swapIn` and `drawnSig` compare against what was built last time, ignoring avatar.js's clip-path ids, not against the page, because aisles.js and lang.js add to the drawn copy); and while a mouse button or finger is down in the panel or drawer nothing there is redrawn until it comes up (`pressing`), so a click is never lost to a rebuild. The drawer's list is full height so the drawer itself scrolls and keeps its place; the people view opens at the top. The name starts as the signed-in account's first name, else the saved party or game name, and can be changed in the panel (saved as `ol:name`). **One name everywhere:** `ol:name` is the player's name for the Online panel, the Party panel and the Leaderboards, in one order (`ol:name`, then the Google account's first name, then `party:name`, then a game's saved name) in `social.js`, `party.js` and `stats.js`. A rename in the Online box (or the Party panel's name box, which saves both keys) is written to the Online node and, while in a party, to the party node within half a second, so other people see it in about a second; `social.js` also sets just `n` on the player's leaderboard entry (`rooms/lb-all/players//n`, only if the entry exists, at most every 4 seconds; once after each page load too, so an entry left with an old name catches up), and fires `backroom:name` (`{uid, n, mine}`) on `document`, as it does when someone else's Online node changes name, so the Leaderboards rename that row at once without a new read. Other tabs follow through the `storage` event. Measured with two windows: before, a rename reached the other window's Online list in 0.8 s but never reached the Party panel (the party node kept `party:name`), and the leaderboard entry only changed the next time a game published (up to 60 s with a game open, never without one; the other window needed a Refresh after that); after, Online 0.9 s, Party 0.9 s, Leaderboards 1.2 s live and the entry in about 2 s. Game name boxes (`ss:name`, `shellcr-name` …) stay each game's own and don't rename you; party launches fill them with the one name. Hide me (`ol:hidden`) takes you off the list, and you can't chat while hidden. **Joinable games:** next to Hide me, **Let people join my games** (localStorage `ol:join`, `'0'` = off; on by default; saved with the account by account-nudge.js; also a "Let people join: On / Off" button in the Online drawer, for use over a game) lets anyone in the Back Room join the online game you're in, party or not. While it's on, you aren't hidden and you aren't in a party set to Private, your Online node carries `jg` (game key from party.js's `GAMES`), `jr` (room code after the game's prefix) and `jt` (when you got there, server time); they're removed when you leave the room or switch it off, and go stale with the node's heartbeat like everything else there. Single-player games and games not in party.js's `GAMES` are never advertised. **Finding the room:** the game runs in its own window (the home page's game layer, the phone page's frame, or party.js's layer on the Back Room page, where party games now open instead of replacing the page) and keeps its connection to itself (every game's `Net` sits inside the game's own function, so the page can't read it). So social.js lists the rooms the open game could be in: the room in the game's address (`#-`, which every party game sets when it joins a room by code), the room party.js launched it into, the code in its room box, and its Quick match rooms (`pub-1` to `pub-6`; Rumble Karts' `lobby` to `lobby-6`). It reads `rooms//players//ts` for each (one small read each) and takes the first that heard from you in the last 20 s; the found room is checked again every 4 s while the game is open, the others every 6 s until one matches. Not covered: Backrooms' Quick match (it pairs two players into a 1v1 room with no code), single-player modes, and a game opened in its own tab. Everyone in a joinable game gets a **Join** button on their row ("In Shell Crackers · Join", or **Queue** when the room is full and the game plays in rounds), from playingnow.js's checks (`window.BackRoomPlaying`); it opens the game in that room the same way Playing now does, and closes the drawer if it was open over a game. When someone's node starts advertising the room you're in after you got there, a small toast says "Ben joined your game" for 5 s (not for your own party, who arrive together; not for blocked or muted people). Tap someone to open their card: Request to chat, invite them to your party (one is created first if you're not in one; they get a Join / No thanks card and Join puts them in your party through party.js), or send them a room code (pick a game and a code; while you're in a game it fills in the room you're in). Private messages need a chat request first: the other person gets a toast and a card with Accept / Decline (and Block), and only once they accept can either side message the other; a message from someone who hasn't been accepted (an older client, say) is dropped, and that person's thread just says to request a chat or to accept theirs. A request runs out after 10 minutes if nobody answers, and then the requester can ask again (one open request per pair; at most one request per person every 10 minutes and ten in 10 minutes in all); a declined request shows "Declined" and can be repeated after the same 10 minutes. If both people request each other at once, that counts as a yes. Accepted pairs are kept in this browser (`ol:chats`, uid to time, at most 60) so you don't have to ask again every visit; End chat in the thread forgets the pair here and tells the other side, which forgets it too. Party invites and room codes aren't chat, so they don't need a request; the cabin chat is unchanged. **Parties:** people in the same party can message each other straight away, without the chat request (their card says so and has no Request to chat button); "the same party" comes from party.js's own member list (the `rooms/pt-` nodes, through `Party.members`), minus anyone on the current leader's kick list (`Party.out`), never from what someone writes in their Online node, so nobody can claim to be in your party. Outside a party, and once someone leaves or is removed, the request is needed again. Block, session block and mute work exactly as before (a blocked party member can't message you and is hidden). **Party chat:** a group chat for the party, opened from the Party chat button in the Online panel (shown while in a party), in the Party panel, in the people drawer, or in a game (see `gamechat.js`). Each message is sealed separately to every member who is in the party at that moment and online here (not to anyone you blocked), with the same ECDH + AES-GCM as private messages, and kept in your own node as `pc/` (the last 6 to each member, `{ i, t, b }`; inside: `{ f, to, k: 'g', c: party code, x: text }`); copies for people who leave the party are dropped, and the oldest copies are trimmed if the node would grow past 50,000 characters. The node also carries `av`, the player's edited avatar as a code (see `avatar.js`; absent if never edited), and `nt`, the colour of their name tile (`'t1:'` or `'t0'`, see `avatar.js`; absent if never chosen), which colours their card in the list and in the drawer. A browser only shows a party message that names its current party code and comes from someone on its current member list, so only the party can read the chat, and people who join later don't see earlier messages; everyone online can see that something was sent to whom and when, as with private messages. Blocked and muted people's party messages are hidden (like the cabin chat), the word filter and the shared rate limit (one message every 1.5 s, five in 10 s) apply, a party message from someone else shows a toast when no game is showing it, and party chat is never logged. Report in someone's private conversation also includes the last 20 party-chat messages (everyone's, marked `[party]`) when that person wrote in the party chat, and the confirm box says so. The party chat is kept for the tab in sessionStorage `ol:pchat` (`{ c: code, m: [...] }`, 80 messages) and starts empty in a new party. `window.BackRoomChat` (`state`, `recent`, `send`, `listen`, `seen`, `open`) lets the in-game chat inside a game's iframe read and send it through this page; it only hands out messages already checked, filtered and masked here. While a game is open, a Chat button next to Online in the game's top bar (shown while in a party with someone) opens the game's own chat box, or the Party chat drawer for a game without one. Deepword is in `GAMES` too (status "In Deepword", room codes), so its top bar gets these buttons. **Join party / Request to join:** when someone's party is Public (its leader's node carries `pp`, see party.js), the leader's row in the list has a Join party button ("Party full" at 8; a game's Join button takes its place while the party's game is joinable), the card of anyone in that party has Join party in place of Request to join, and their status reads "Public party of 3"; it joins through `Party.join(code, true)`, which refuses if the party has gone Private, is full, or its leader removed you in the last 10 minutes, and asks first if you'd be leaving a party of your own. Otherwise the card of someone in a party has Request to join, next to Invite to party. It sends a sealed `j` to that party's leader: to them if they lead it, otherwise to their leader when that person is online (the card says so and shows how it's going, with a button to open the leader's chat); if a `j` reaches someone who isn't the leader (their leader is offline, say), their browser answers `x` with `lead` and who the leader is, and the requester sees "Only the leader can accept — ask " with an Ask button when that leader is online. A leader with room gets a toast and a card with Let them in / Decline; Let them in sends `y` with the party code, and the requester gets a Join party button (toast and card) that joins through party.js, so a person who was kicked is still kept out by the party's own 10-minute rule; Decline sends `x`. A full party (8), someone who isn't the leader, or someone no longer in a party answers `x` straight away with the reason. One open request per party (per leader) at a time, 10 minutes to answer, a repeat only 10 minutes after a no, and the same ten-requests-in-10-minutes limit as chat requests; a `y` or `x` only counts when it answers a request this tab sent. Join-request state lives in the thread in sessionStorage (`jq`, `jx`, `jw`, `jc`, `jl`, `jln`, `jin`, `jnd`), like chat requests. Room invites only ever become the site's own invite links (`/#-`, Rumble Karts `/#`) built from a known game and a checked code, never a link someone typed, and opening one goes straight into that game's room. The cabin chat is one public chat for everyone online; it shows the last 30 minutes from people who are still here. Each cabin message is also saved, sealed, to Firestore `chatlog` for the admin page (see below). A Privacy link to `/privacy.html` sits at the bottom of the panel. Mute (`ol:mute`) hides someone's cabin-chat messages and silences their notifications; Block (`ol:block`) also hides them from the list and hides their messages, requests and invites; both are saved only in this browser. Block for this session does the same as Block but is kept in sessionStorage (`ol:sblock`), so it's forgotten when the tab closes; the Blocked section of the people view lists both, with "(this session)" on the latter, and Unblock clears either. While a game is open in the page's game layer (home page, phone page, or a party launch), an Online button in the game's top bar opens the same list, chats and invites, and the status shows "In "; a game opened by its card on the Back Room page opened directly leaves the page, so that person goes offline until they come back. Loaded like party.js: a ``, lists its actions in `Keybinds.create({game, actions: [{id, label, keys: ['KeyW', 'ArrowUp']}]})` (keys are `e.code` names, so they're physical keys on any layout; mouse buttons are `Mouse0`/`Mouse1`/`Mouse2` in games that pass `mouse: true`), checks input with `KB.is(action, e.code)` and `KB.held(action, keys)` instead of comparing key codes, and opens the panel from a Controls button with `KB.open()`. Changed keys are saved only in the player's browser, under localStorage `keybinds:` as `{v: 1, b: {action: [codes]}}` (only the actions that differ from the defaults; Reset to defaults removes the entry), and never go to Firebase. Esc is never rebindable. Elements with `data-kb="action"` show the current keys and update themselves. The panel takes each game's look from `--kb-*` CSS variables and the game's own button classes; the comment at the top of the file lists the options. To add it to a game, do the same, and keep text inputs (names, room codes, chat) returning before any key lookup. Touch controls don't go through key codes: each game's touch buttons feed its input directly (in Shell Crackers, Quarry and Backrooms they hold actions by id in `tAct`, which the game checks alongside `KB.held`), so they keep working whatever keys are bound, and the Change keys / Controls buttons are hidden in the touch layout (`body.touch`). **Spanish** (lang.js, when the page loads it): keybinds.js adds the panel's own words and common key and action names once (guarded by `if (window.BackRoomLang)`), and builds its messages and aria-labels with the action and key names in the page's language (a game's own dictionary supplies its action names); in English, or without lang.js, every string is as before. - `e63334287a3deaa3/school.js`: Your school (Back Room page, the home page's copy of it and the phone page). A small box at the end of the page header where each player picks the school they go to: one button per school plus Not listed, as a radio group (click, or the arrow keys). The schools are Avenues (New York) and St. Andrew’s Scots School (`standrews`, Olivos, Buenos Aires, Argentina; a bilingual English–Spanish school, so lang.js's Spanish matters there); to add one, add a row to `SCHOOLS` (`id`, a short lowercase id that never changes, `name`, `place`). The script fills in every empty `[data-school]` element: the Back Room page has one at the end of its `
` (so the home page's `reveal()`, which copies the header, gets it too, and loads the script after `events.js`), and the phone page has one at the end of its header. Being in the header, layout.js never moves it. **Storage:** localStorage `school:v1`, the school's id (`avenues`) or `other` for Not listed; no key means nothing picked yet. It is in account-nudge.js's `KEYS`, so a Google account's save carries it to the player's other devices (visible to other signed-in browsers, like everything in that save). Nothing else is stored online. **Search and Add my school:** only schools marked `suggest: true` in `SCHOOLS` (Avenues) are shown before a search, plus the one the player picked; every other school is found by typing in the search box above the choices, which filters them as you type (name and place, accents ignored; Enter picks the first match). With no match, or from the dashed "Add my school" button, a small form asks for the school's name, its city or town and its country (only the general area; it says not to put a name or address) and sends one note through the suggestion box (`BackRoomFeedback.send` in feedback.js, the same sealed `feedback` documents, limits and admin Feedback tab, so no new storage or rules): "School request: (, ). Sent from Your school." The player's choice becomes Not listed, and localStorage `school:req` ({n, p, t}, also in account-nudge.js's KEYS) remembers what they asked for, so the box says "You asked us to add … We'll add it soon." To add a requested school, read it on the admin page's Feedback tab and add its row to `SCHOOLS`. Nothing uses the choice yet: other scripts can read it with `BackRoomSchool.get()` (the row, or null) and hear changes through the `backroom:school` event on `document` (`{id}`). @@ -220,7 +220,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the - `prompted/`: Prompted, a supplemental essay tracker for college applicants (plain JavaScript, no backend; everything is saved in the student's browser under `prompted:v1`). Students add schools with a plan and deadline, paste a supplement page to pull out each prompt with its word or character limit and whether it's optional (`parsePrompts` in the page), write drafts with a live count, save and restore versions, and start new essays from existing drafts. A reuse map groups similar prompts across schools by kind (Why us, academic interest, community, and so on). Backups download as JSON; all drafts download as one .txt. `prompted/schools.js` is the school library: the U.S. News 2027 top 50 national universities with their 2026–27 supplement prompts (as short summaries in our own words, with real limits), choose-N sets, college- or program-specific prompts keyed to the student's intended major, application plans and deadlines. UC campuses share one application, so they're added as a single school. Update the file each August when schools publish new prompts, and keep every prompt as a summary in your own words: don't paste schools' official prompt text into this repo, even though it's posted publicly. No ads on this page. - `e63334287a3deaa3/m/`: the phone version of the Back Room: every game (the Back Room ones plus Hype Cycle Exchange) as a tile, under the same six headings as the computer version, in the same play-time order (Cars, Shooters, Parkour, Party games, Puzzles, Arcade; `MODES`), with a row of six buttons above the lists that jump to each heading (`.gnav`), the Turkey Week switch under the title during the event (`data-turkey-switch` in the header's `.tkrow`; see `events.js`), and grouped by kind under each (each `GROUPS` row is `[kind, games, mode, 1 for the puzzle tiles]`, mode `'cars'`, `'shooters'`, `'parkour'`, `'partygames'`, `'puzzles'` or `'arcade'`, with the rows of one mode kept together; Hype Cycle Exchange is under Arcade). Puzzles starts with the small tiles (`.grid.pz`: what it is in plain words, then its name): Deepword, Trivium, the listed daily puzzles and, last, Daily Puzzles (the fifteen least played puzzles, Boxed among them, came off on 18 Nov 2026: see the Back Room page above; their thumbnails stay). The daily puzzles aren't counted as games; Deepword and Trivium are (a `1` at the end of their rows), and the Puzzles heading says "12 puzzles + 4 games". At the bottom of Puzzles, a small tab (`.ask.ask-sm`, `pzAsk`) asks "Miss a puzzle we took away, or want a new one?" with a Tell us button (`data-feedback-open="Puzzles: "`). The Daily Puzzles tile (`daily`, not counted, a whole row wide with `.pz-all` so the puzzle rows come out even) is the page with every listed puzzle and the streak; it opens in the frame like a game, and the daily games it links to open in the same frame (its `scope` is the whole Back Room folder). After the games, a "Want more games, or have an idea?" note has a Tell us button that opens the feedback bar. A game opens full screen in a frame under a thin bar with the way back, and the last one played shows at the top as Keep playing. The Leaderboards section (leaderboard.js) comes after the games. Its own look is dark; it also has a light look (the light variables at the top of its `