openvibers/openvibe.shared Commits

1.2.0: navbar.js loads release-watch.js after init (opt out with releaseWatch: false)

OP OpenVibers committed 23 Sept 2026 · 7136ff0326 · 3 files, +21 −1


Changes

ddiff --git a/CHANGELOG.md b/CHANGELOG.md
iindex 96ed00b..fec3046 100644
---- a/CHANGELOG.md
++++ b/CHANGELOG.md
@@@ -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.
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`
ddiff --git a/navbar.js b/navbar.js
iindex 53b22a8..9eb593a 100644
---- a/navbar.js
++++ b/navbar.js
@@@ -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
ddiff --git a/package.json b/package.json
iindex 827f990..224ff94 100644
---- a/package.json
++++ b/package.json
@@@ -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": {