From 61327ca5580cfbf571e46571d5e6acda116dc4d4 Mon Sep 17 00:00:00 2001 From: Loren McIntyre Date: Mon, 15 Jun 2026 02:17:20 -0700 Subject: [PATCH] mw/: keep upstream archive + maintained live copy; recipe stays the recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct the previous over-removal: I do want the upstream file tracked. Restructure into mw/nav-popups/ holding two copies per page — nav-popups/upstream/popups.js pristine upstream snapshot (mwsync `local`, refreshed in place by `merge`; revid in mwsync.yaml) nav-popups/popups.js LIVE maintained copy — edit here, include elsewhere The bulky 50-revision _cache/ stays gitignored (reproducible from mwsync.yaml); only the single current snapshot is tracked. Live delta (marked with `// LOCAL MOD`, quoting upstream so it survives refresh): - popupFilterLastModified now shows an absolute UTC last-modified timestamp plus a 1-char current-age scale indicator (s/m/h/d/w) instead of relative "3 weeks old". Docs: - mw/README: nav-popups layout, tracked-vs-gitignored, and a Distribution & versioning roadmap — jsDelivr gh passthrough (per WP:User scripts), SRI-verified pins, canonical URN, and an in-script metadata block (Tampermonkey/PEP-723 style) that tracks upstreams and suggests diff-bumps for wiki common.js / Tampermonkey. - README: roadmap items for an on-page notification library and a storage/env probing library (cookies/localStorage/IndexedDB/GM_*). Co-Authored-By: Claude Opus 4.8 (1M context) --- README.md | 14 +- mw/.gitignore | 4 + mw/README.md | 140 +- mw/mwsync.yaml | 28 +- mw/nav-popups/popups.js | 9582 +++++++++++++++++ .../upstream/popups.js} | 0 6 files changed, 9732 insertions(+), 36 deletions(-) create mode 100644 mw/.gitignore create mode 100644 mw/nav-popups/popups.js rename mw/{MediaWiki:Gadget-popups.js.mw => nav-popups/upstream/popups.js} (100%) diff --git a/README.md b/README.md index 828af3b..74ef9b4 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ script is explicit. | [`scripts/`](scripts/) | The real deal: installable `*.user.js` with full `==UserScript==` headers | — (this is the shippable layer) | | [`samples/`](samples/) | Reference scripts (mine or others') kept to learn from — *not* meant to be installed as-is | — (study material) | | [`memory/`](memory/) | Notes: per-site quirks, DOM selectors that break, API gotchas, decisions | — (knowledge, not code) | -| [`mw/`](mw/) | MediaWiki-sourced scripts/gadgets, tracked with [mwsync] so each page keeps its upstream revision history (e.g. Navigation popups) | — (mirror + history) | +| [`mw/`](mw/) | MediaWiki-sourced scripts/gadgets tracked with [mwsync] — the registry/recipe (e.g. Navigation popups); fetch bodies on demand (cache is gitignored) | — (recipe) | [mwsync]: https://github.com/mcint/mwsync @@ -58,6 +58,18 @@ code when each is built): - **State opportunities.** Where scripts touch `localStorage` / cookies / `GM_setValue`, document the keys and surface them (inspect / export / reset). Cookies likely don't matter for most; `localStorage` + `GM_*` storage do. +- **CDN delivery + SRI + version-tracking.** jsDelivr GitHub passthrough for + in-page `