#javascript
18 posts
A line nobody ever drew
Linkvault had code that worked out how many page pictures it keeps on your device and wrote it on the Settings page. The Settings page had no place for it. A 40-line script found it in a second.
Two clicks, one ticket
A member double-clicks "Open a ticket" and gets two tickets, past the limit of one. The check was there. It just ran twice before either click had finished. How I made a button do its work once.
The role that didn't exist yet
A comparison said two lists of permissions were the same. They weren't. One of them mentioned a role that was about to be created, and a thing with no id yet is very easy to leave out.
1,152 servers in one loop
My bot builds Discord servers from a list of switches. Who can see and write in each channel depends on all of them at once. I checked every combination with a loop, found nothing, changed the question, and found two bugs.
I pressed every button on my own website
My Discord bot's dashboard has more buttons than I can keep in my head. So a script pressed all 1,730 of them and wrote down which ones did nothing. Almost all the answers were boring, and that was the point.
Travel mode: what one switch can honestly promise
One switch takes the vaults, aliases and 2FA codes I pick off my own devices until my master password brings them back. The switch was the easy part. Making every page forget, and saying what it doesn't protect, was the work.
The link that says one thing and goes somewhere else
On a fake mail, the words on a link and the address behind it disagree. Keyhaven's reading page now checks every link on my device, without visiting any of them. What it looks for, what it can't know, and the button that offered the bad link anyway.
Zero-knowledge on a free plan: what my own server can't see
Keyhaven's server stores all my passwords and has never seen one. Here's the key split that makes that work, using only the browser's built-in crypto, and the limits I'm not going to hide.
Receiving email for free with a Cloudflare Worker
Every alias on my domain lands in one small Worker that decides what to do, seals the message and stores it, on Cloudflare's free plan. No mail server, no file storage, no card on file.
Sealing mail so my own server can't read it
Email arrives in plain text, like all email. Milliseconds later, Keyhaven has sealed it to a key that only my devices have. Here's the envelope, what it protects, and why the alias addresses themselves stay readable.
Three AI agents built one app at the same time. One file kept them apart.
Keyhaven was built by three AI coding agents working in the same folder at once: the core, the mail side and the browser extension. What made it work was a contract that said who owns what, and one rule about git.
A Derja dictionary that never guesses
Tunisian Derja is often written in Latin letters with numbers, and no two people spell it the same way. I made a small dictionary for it, one that says "unknown" instead of making something up.
Three Tunisian card games, one engine
After Chkobba, I wanted Rami and Belote online too. Instead of writing the online part twice more, I took it out of Chkobba and gave each new game only its own rules.
Two people, one code box, no conflicts
Interview Room lets an interviewer and a candidate type in the same code at the same time. This is how both copies stay identical, and how the hidden tests stay hidden.
Prayer times that match the official tables to the minute
I made a prayer-times app for Tunisia that works the times out on the phone, offline. The hard part was finding the exact rules behind the official tables.
My corner of the internet is a pixel room
nani.is-a.dev is a tiny pixel-art room with a computer in it. Click the screen and it boots into a whole pretend desktop, and everyone visiting at the same time shows up in the room.
I used three tab savers. So I built my own.
Each of the extensions I used to save my tabs lost me something. Linkvault does what I needed from all three: save tabs and sessions, read suspended tabs, and never lose a link.
Short links that delete themselves
I wanted my own link shortener, but not one whose database grows forever. So every link in Poof gets a lifetime, and the database removes it by itself, right on time.