openvibers/openvibe.shared Commits
1.2.0: navbar.js loads release-watch.js after init (opt out with releaseWatch: false)
Changes
@@@ -4,6 +4,12 @@ All notable changes to `openvibe-shared`. Versions follow [semver](https://semvebreaking change to any exported module, browser global or served file name is a new major.A release is the git tag `vX.Y.Z`; consumers pin the tag's tarball (see README).++## 1.2.0 — 2026-09-23++++- `navbar.js` loads `release-watch.js` (from the same place it was loaded from) four seconds after++ `init()`, so every site on the shared navbar gets release prompts once it serves `/release.json`.++ A site without the route costs one 404 per page load; `init({ releaseWatch: false })` opts out.++## 1.1.1 — 2026-09-23- `release-watch.js` works without the `<meta name="ov-release">` tag: the release `/release.json`@@@ -407,6 +407,19 @@}function upgradeIconsWhenFontsReady() { /* icons no longer depend on webfonts */ }++ // Release watch (ADR-016): a few seconds after the page settles, load release-watch.js from the++ // same place as this navbar, so every site that serves /release.json gets update prompts with++ // no page changes. Opt out with init({ releaseWatch: false }).++ function loadReleaseWatch() {++ try {++ if (_config.releaseWatch === false || root.OVRelease || document.querySelector('script[src*="release-watch.js"]')) return;++ const m = /^(https?:\/\/[^?#]*\/)navbar\.js(?:[?#]|$)/.exec(_selfSrc);++ const sc = document.createElement('script'); sc.src = `${m ? m[1] : 'https://openvibe.network/shared/'}release-watch.js`; sc.async = true;++ try { sc.fetchPriority = 'low'; } catch { /* */ }++ document.head.appendChild(sc);++ } catch { /* optional */ }++ }++// ─── Brand from hostname ───────────────────────────────────// Every property is <sub?>.openvibe.<tld> (plus openre.stream). The navbar spells the// whole name — Pastes.OpenVibe.Tools, not "Paste.OpenVibe" — because the subdomain and@@@ -1457,6 +1470,7 @@injectStyles();const el = render();upgradeIconsWhenFontsReady();++ if (typeof document !== 'undefined') setTimeout(loadReleaseWatch, 4000);// Pages that hand us a resolved user (openvibe.network, the tools// gateway hub) keep full control. Everyone else — pages that pass// only a token, or nothing at all — gets the user resolved from@@@ -1,6 +1,6 @@{"name": "openvibe-shared",-- "version": "1.1.1",++ "version": "1.2.0","description": "Shared navbar, footer, themes, icons, legal pages, SEO, auth and analytics for every OpenVibe site","main": "index.js","exports": {
@@ -4,6 +4,12 @@ All notable changes to `openvibe-shared`. Versions follow [semver](https://semve
@@ -4,6 +4,12 @@ All notable changes to `openvibe-shared`. Versions follow [semver](https://semve
breaking change to any exported module, browser global or served file name is a new major.
breaking change to any exported module, browser global or served file name is a new major.
A release is the git tag `vX.Y.Z`; consumers pin the tag's tarball (see README).
A release is the git tag `vX.Y.Z`; consumers pin the tag's tarball (see README).
+## 1.2.0 — 2026-09-23
+
+- `navbar.js` loads `release-watch.js` (from the same place it was loaded from) four seconds after
+ `init()`, so every site on the shared navbar gets release prompts once it serves `/release.json`.
+ A site without the route costs one 404 per page load; `init({ releaseWatch: false })` opts out.
+
## 1.1.1 — 2026-09-23
## 1.1.1 — 2026-09-23
- `release-watch.js` works without the `<meta name="ov-release">` tag: the release `/release.json`
- `release-watch.js` works without the `<meta name="ov-release">` tag: the release `/release.json`
@@ -407,6 +407,19 @@
@@ -407,6 +407,19 @@
}
}
function upgradeIconsWhenFontsReady() { /* icons no longer depend on webfonts */ }
function upgradeIconsWhenFontsReady() { /* icons no longer depend on webfonts */ }
+ // Release watch (ADR-016): a few seconds after the page settles, load release-watch.js from the
+ // same place as this navbar, so every site that serves /release.json gets update prompts with
+ // no page changes. Opt out with init({ releaseWatch: false }).
+ function loadReleaseWatch() {
+ try {
+ if (_config.releaseWatch === false || root.OVRelease || document.querySelector('script[src*="release-watch.js"]')) return;
+ const m = /^(https?:\/\/[^?#]*\/)navbar\.js(?:[?#]|$)/.exec(_selfSrc);
+ const sc = document.createElement('script'); sc.src = `${m ? m[1] : 'https://openvibe.network/shared/'}release-watch.js`; sc.async = true;
+ try { sc.fetchPriority = 'low'; } catch { /* */ }
+ document.head.appendChild(sc);
+ } catch { /* optional */ }
+ }
+
// ─── Brand from hostname ───────────────────────────────────
// ─── Brand from hostname ───────────────────────────────────
// Every property is <sub?>.openvibe.<tld> (plus openre.stream). The navbar spells the
// Every property is <sub?>.openvibe.<tld> (plus openre.stream). The navbar spells the
// whole name — Pastes.OpenVibe.Tools, not "Paste.OpenVibe" — because the subdomain and
// whole name — Pastes.OpenVibe.Tools, not "Paste.OpenVibe" — because the subdomain and
@@ -1457,6 +1470,7 @@
@@ -1457,6 +1470,7 @@
injectStyles();
injectStyles();
const el = render();
const el = render();
upgradeIconsWhenFontsReady();
upgradeIconsWhenFontsReady();
+ if (typeof document !== 'undefined') setTimeout(loadReleaseWatch, 4000);
// Pages that hand us a resolved user (openvibe.network, the tools
// Pages that hand us a resolved user (openvibe.network, the tools
// gateway hub) keep full control. Everyone else — pages that pass
// gateway hub) keep full control. Everyone else — pages that pass
// only a token, or nothing at all — gets the user resolved from
// only a token, or nothing at all — gets the user resolved from
@@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
{
{
"name": "openvibe-shared",
"name": "openvibe-shared",
- "version": "1.1.1",
+ "version": "1.2.0",
"description": "Shared navbar, footer, themes, icons, legal pages, SEO, auth and analytics for every OpenVibe site",
"description": "Shared navbar, footer, themes, icons, legal pages, SEO, auth and analytics for every OpenVibe site",
"main": "index.js",
"main": "index.js",
"exports": {
"exports": {