karooster

A rooster that runs around your web page. He struts, sprints, pecks, crows, perches on your headings, chases your cursor, and occasionally makes off with one of your labels. Then he goes back in his coop.

Press the button in the bottom left.

What it is

Zero dependencies, one <script> or one import, about 12kB. Every pixel is inline SVG, so there is nothing to host and no img-src to widen. He is drawn, not filmed.

Two promises

He cannot intercept anything

The overlay is pointer-events: none end to end. No click, focus, key or scroll reaches it, so he cannot break an interaction no matter what he is doing.

He never reads your text

Layout awareness is geometry only — element boxes, and per-character boxes from a Range. Never textContent. He knows where letters are and nothing about what they say.

He never writes to your DOM

The label he "steals" is covered by a patch in his own overlay. Your markup is untouched, which is why the theft undoes itself.

He does not take your cursor

What he carries off is a drawn decoy. The real pointer is never hidden, moved, or captured — you keep clicking.

Install

npm i karooster
import { createKarooster } from 'karooster';

const bird = createKarooster({ count: 1 });
bird.release();          // let him out
await bird.sendHome();   // coop appears, he runs into it, then it packs up

API

MemberTypeDoes
release(n?)numberAdds birds, starting the loop. Returns the new count.
sendHome()PromiseCoop farewell. Resolves once the screen is empty.
destroy()voidRemoves everything at once. Idempotent.
running()booleanWhether any bird is out.
count()numberHow many are out.

Options

OptionDefaultNotes
count1Birds per release(). This demo asks for 3.
maxFlock6How many may be out at once. Hard-capped at 12.
spawnEveryMs15000One more turns up this often until the cap. 0 disables it.
crowfalseAudible crow. Off by default; even on, nothing sounds before a user gesture.
selectorsheadings, nav, table headsWhat he may perch on and steal from. Keep it to page furniture.
palettepeachAny subset of the colours.
zIndexnear the topOverlay stacking order.

Prior art, and why this is not a fork of it

The inspiration is Desktop Goose, which is a native Windows program: it moves your real cursor and drags your real windows. None of that is possible from a web page, and its artwork is not licensed for reuse — so nothing here is derived from it. This is a browser toy that only pretends to misbehave, written from scratch, MIT licensed.