Skip to content

09SoftwareFirefox / Waterfox extension · WebExtensions (MV2) · JavaScript

Screen Watcher — Web Extension

A Firefox/Waterfox extension that watches a selected region of the active tab for pixel changes and raises an alarm when movement is detected — the browser counterpart to the ScreenWatcher Android app.

Open source on GitHub

fig. 10 · active-tab region diff with alarm (representation)
fig. 10 · active-tab region diff with alarm (representation)

The same idea, inside a tab

Screen Watcher already exists as an Android app built on MediaProjection. This extension carries the idea into the browser: pick a region of the page you are actually looking at and get told the moment something moves inside it.

It is intentionally WebExtensions-scoped — activeTab and notifications — so it is never given permanent access to every site, and it stops watching the moment you leave the tab you started it on.

What makes it technically interesting

  • Drag-select a rectangle inside the visible tab; the extension samples it once per second and diffs RGBA pixels against the previous frame
  • Alarm fires when at least 10 pixels change by 10 channel units or more, with a heartbeat ping every 10 seconds
  • Scoped to just the tab you activate: monitoring pauses if the tab reloads, changes origin, stops responding or is no longer active (activeTab only, no blanket site access)
  • Press any key or use Stop alarm to silence and re-baseline
GitHub Get in touch