← All writing

Keeping a computer awake without a utility belt

StayAwake does one thing, has four permissions, and can name the feature that dies without each of them. That constraint is the product.

There is a category of small utility that starts useful and ends as a suite. It keeps your machine awake, and then it also tracks your uptime, and then it wants an account so it can sync your uptime, and by version 4 it is asking to read and change data on all websites.

StayAwake is a deliberate attempt to stop at the first step.

What it does

Flip a switch and your computer will not sleep. Flip it back and it will. Or pick a timer — 30 minutes, 1, 2, 4 or 8 hours — and it hands sleep back to you automatically, so nothing is left running overnight.

You can choose whether the screen stays lit too, or only the system stays awake while the display sleeps. That distinction matters more than it sounds: a long download does not need to light the room for six hours.

Four permissions, four sentences

The rule we hold ourselves to is that every permission must have a feature that dies without it, in one sentence a non-developer can read.

  • power — the API that actually prevents sleep. This is the product.
  • storage — remembers whether it is on, your timer, and your display choice, on this device.
  • alarms — checks whether a countdown has expired while the popup is closed.
  • offscreen — keeps the background worker alive with a silent audio buffer, so the lock is never dropped unexpectedly.

No host permissions, so it cannot read any web page. No network requests at all, to anywhere.

The mistake worth admitting

For its first two versions, StayAwake’s privacy policy listed five storage keys and the code wrote six. The missing one was keepDisplayOn — the display setting above.

Nothing was transmitted; the extension makes no requests. But a policy that under-lists what it stores is inaccurate, and inaccuracy is what gets listings pulled, quite reasonably. It is fixed, and it is why “grep the source for every storage write and diff it against the policy” is now a step before every submission rather than a thing we remember to do.

StayAwake is free on the Chrome Web Store.