0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
Mark a button as the watch toggle for the current page. Stores a content hash; on revisit, fires a watch notification when content has changed.
Overview
Add data-watch-page to any <button> to make it a per-page bookmark + change-watcher. Click toggles between “Watch” and “Watching.” State persists per-URL via VBStore.
On every subsequent visit the script recomputes a content hash of the page’s <main> (or <article>); if it differs from the stored hash, a notification-wc:new event fires so <notification-wc> can surface the change. The watch list itself appears in the notification panel’s “Watching” tab.
This is the internal equivalent of GoodURL’s outbound link health monitoring — it watches your own pages for content drift, not other sites’ URLs.
Markup
Place the button anywhere — <page-tools> is the conventional home, but any DOM location works. The script lazy-loads when it sees the attribute on the page.
Basic watch button
<buttontype="button"data-watch-page><icon-wcname="bookmark"></icon-wc><span>Watch for updates</span></button>
The script swaps the <icon-wc> name (bookmark ↔ bookmark-check), sets aria-pressed, and swaps the inline text label (Watch for updates ↔ Watching). To keep your own label, add data-watch-label-locked.
Override the strings per button for other languages:
VBStore namespace watches, key = the normalised page path (/x, /x/ and /x/index.html all share /x; older keys are migrated on first read). Each entry:
Stored shape
{url: '/docs/getting-started',title: 'Getting Started — Vanilla Breeze',contentHash: 'a8f3c2b9', // FNV-1a of <main> textContentwatchedAt: '2026-04-21T10:00:00Z',lastChecked: '2026-04-21T15:30:00Z',lastChanged: null, // ISO timestamp when hash last differedsubscriptionId: null, // server-side id if /go/notify/subscribe was used}
The hash deliberately covers only <main> (or the first <article>) so nav/footer/sidebar churn doesn’t trigger false positives.
Events
Event
Detail
When
page-watch:add
{ entry }
User clicked Watch
page-watch:remove
{ url, subscriptionId }
User clicked Unwatch (in the button or in the notification panel’s Watching tab)
notification-wc:new
{ notification }
Page revisit detected a hash change — type is watch. Every <notification-wc> on the page shows it in the bell; unwatching from the bell also unsubscribes on the server when server-sync is on and resyncs every watch button.
Server-side sync (opt-in)
If your site has a /go/notify backend, you can mirror watches server-side so the system can notify users between visits (e.g., via email). Opt in with a meta tag or a global flag:
Opt in via meta tag
<metaname="vb-page-watch-server"content="true">
Or via a global before main.js loads
window.vbPageWatch = { serverSync: true };
When enabled, the watch button additionally POSTs /go/notify/subscribe with { url, type: "page-watch", notify: ["panel"] } on watch, and DELETEs the subscription on unwatch. Failures are logged to the console; the local watch still works regardless.
Accessibility
The button uses aria-pressed to expose watched/unwatched state to assistive tech.
title updates to describe the next action (“Watch this page for content updates” vs. “Stop watching this page”).
Operates as a normal <button> — native keyboard activation, focus styles, and screen-reader announcements come for free.