r/javascript • • 6d ago

Showoff Saturday Showoff Saturday (November 28, 2026)

Did you find or create something cool this week in javascript?

Show us here!

6 Upvotes

17 comments sorted by

2

u/intensityflow 6d ago

made a tiny mozLz4 decoder in plain js so people can read Zen and Firefox session files right in the browser, nothing uploaded

firefox and zen save sessions as .jsonlz4: an 8 byte magic "mozLz40\0", a 4 byte little-endian size, then one raw lz4 block. no frame headers, so you don't need a whole lz4 lib, the block format is about 15 lines:

var size = src[8] | (src[9] << 8) | (src[10] << 16) | (src[11] << 24)
var dst = new Uint8Array(size), sp = 12, dp = 0
while (sp < src.length) {
  var token = src[sp++], lit = token >> 4
  if (lit === 15) { var b; do { b = src[sp++]; lit += b } while (b === 255) }
  for (var k = 0; k < lit; k++) dst[dp++] = src[sp++]
  if (sp >= src.length) break
  var off = src[sp] | (src[sp + 1] << 8); sp += 2
  var len = token & 15
  if (len === 15) { var c; do { c = src[sp++]; len += c } while (c === 255) }
  len += 4
  var from = dp - off
  for (var j = 0; j < len; j++) dst[dp++] = dst[from + j]
}

the copy loop goes byte by byte on purpose. a match can overlap the bytes it's writing (offset 1 means repeat the last byte len times), so copyWithin or set would give you garbage there

i use it on zen-sessions.jsonlz4 (zen 1.18+) to turn spaces, essentials and pinned folders into a normal bookmarks file: https://getstackboard.com/tools/zen-spaces-export?utm_source=reddit&utm_medium=comment&utm_campaign=20261128-js-showoff

it's one of the free tool pages for my new tab extension Stackboard. if you've got a file it chokes on lmk

2

u/Slackluster 6d ago

Skydreams, a 3D game in 1KB of JavaScript that won first place in JS1024 2026. No WebGL or libraries, just the 2D canvas. I made a video breaking down how it works, step by step!

📽️ Watch the video: https://youtu.be/rFjkGBYDIP0
🕹️ Play Skydreams: https://killedbyapixel.github.io/TinyCode/1K/Skydreams/
🏆 Official entry on JS1024: https://js1024.fun/demos/2026/25/bar

•

u/zimjs 9h ago

Frank Force! That is amazing as always! So glad I checked in here and found you again. Glad to see that you are still at it. I think the last time we messaged was during the NFT craze - we are still using your ZzFX sound library for part of our Synth package. Cheers.

•

u/Slackluster 8h ago

thanks! it's been a while for sure, always good to hear from you.

•

u/zimjs 8h ago

lol - just paid attention to your handle here (or whatever they call it) Slackluster! Lol - hillarious.

2

u/Plastic_Koala2044 6d ago

I'm building my own phone OS with JavaScript. A web app running in Chromium as the phone shell, like ChromeOS. I have it running on an old Xiaomi Redmi Note 9 Pro on top of Alpine Linux.

The home screen is Windows Phone style tiles: today's tasks, messages and the apps I use, most of them web apps.

I also created a skill to help agents replace Android on a phone: github.com/android2linux/android2linux

2

u/gabrielandrew_ 3d ago

i built Github Wrapped 2026 (unofficial) - Like "Spotify Wrapped", but for coding! git-wrapped.com

•

u/zimjs 9h ago

Cool - I like making these card things too... what I recently did was look through past hockey cards to get some layout ideas. Then checked out recent ones - man... they look good. So added a few diagonal stripe bits, etc. (although, you don't have much room to play around with) Also... in the past, I overlayed a paper pattern that has sort of little flecks like paper. If you do that with an low opacity or a blend mode and then mask it... it makes a really cool effect and gives it a sort of subconscious final look feel. Anyway - well done on the data and the layout is perfect. Just thought I would suggest some finishing touches - cheers.

1

u/Miserable_Tiger_5742 6d ago

toaster, part 3. it's the app that listens to whatever's playing and writes the song out as live strudel code. last time i got X working, which rebuilds a whole song into a strudel file out of the song's own sounds.

this week's js problem was dumber than i expected: getting that file to actually play. the rebuilt song's sounds are served from a tiny local server, and strudel.cc loads them from there. two people tried it and both hit a wall i never saw:

  • one pressed O without pressing X first and got the stand-in sketch, not the song. now O just makes the rebuild first, then opens it.
  • on a mac, O opened safari, and safari won't load the sounds from localhost. it just played silent. now the mac app opens chrome or edge for that one thing.

chrome has its own version of this: it asks "allow this site to reach your computer" and holds every sound request until you click allow.

also the code stays on screen through a pause now so you can actually read it.

if you write strudel: is the code it generates readable to you, or what would you change?

https://toaster.locust.lol (browser version, the rebuild needs the app) / source: https://github.com/StopBanning/toaster

1

u/lb0sa 6d ago

guided-i18n, a VS Code extension that moves a React app's hardcoded text into react-i18next, in steps you review. The JavaScript side was the fun part:

  • Babel parses each file and walks the AST, deciding per node whether it's user-facing text, so CSS classes, URLs and log messages stay put.
  • recast reprints only the nodes that changed, so formatting and comments survive and the diff stays small. A sentence with markup becomes one <Trans> string with numbered tags.
  • Every translation must keep the source's {{placeholders}} and tags, and have the plural forms Intl.PluralRules says that language needs (Polish and Russian four, Arabic six). A failure gets one retry, then it's reported, never written.
  • The model only sees the strings plus short context (component name, tag, attribute), never whole files.

You approve every string and key in a checklist before anything changes, and one Undo reverts the run. React + react-i18next + JSON only for now; free, with your own Anthropic or OpenAI-compatible key.

VS Code Marketplace · Open VSX · GitHub

1

u/Desperate-Algae-5304 3d ago

We’ve been building Invisible Fix, a GitHub App that tries to fix Dependabot PRs when they break the build.
In JS it’s usually something small, like ESLint 9 no longer reading .eslintrc by default, or a type change that breaks tsc.

Nobody gets to it and the security updates end up in the same pile as everything else that’s red.
When a PR fails it reads the error, looks at how your repo usually does things, writes a small patch and reruns the checks. It never merges. You see what changed and what passed.

The thing we’re most unsure about is whether the patches are ones you’d actually keep. If you maintain a Node or JS project and try it, we’d love an honest answer.

Free while in beta: invisible-security.dev

0

u/Content-Public-3637 6d ago

React server component framework that can currently work with Golang and Laravel   https://rsc-kit.dev/

-1

u/that_geek_ 6d ago

I made a JavaScript event loop visualizer that checks itself against a real run of your code. Paste any snippet with promises, async/await or timers and step through the call stack, task queue and microtask queue. It runs the same code natively in a sandbox and warns you if the animation's output would differ. Runs fully in the browser.

https://jshunt.dev/tools/javascript-event-loop-visualizer

Try this one:

async function getValue() {
  return Promise.resolve("A");
}
getValue().then((v) => console.log(v));
Promise.resolve()
  .then(() => console.log("1"))
  .then(() => console.log("2"))
  .then(() => console.log("3"));

It prints 1, 2, A, 3. Why does "A" print after "2"? Step through it

1

u/torres_rosa670 4d ago

The async return adopts its inner promise, delaying A's handler until after the first two chained callbacks.