# mw/ — MediaWiki-sourced scripts Userscripts and gadgets pulled from MediaWiki wikis, tracked with **[mwsync]** (your fork) — git-like fetch/diff/push over wiki pages. This subtree stores the **recipe** (which pages, which wiki), not a vendored copy of the upstream content: `mwsync.yaml` is the registry, and you run `fetch` locally to pull the bodies/history on demand. This subtree exists because there will be more than one MW script; non-MW userscripts live elsewhere in the repo (`scripts/`, `drafts/`). [mwsync]: https://github.com/mcint/mwsync ## Tracked pages | Page | Origin | |---|---| | [`MediaWiki:Gadget-popups.js`](https://en.wikipedia.org/wiki/MediaWiki:Gadget-popups.js) — Navigation popups ("Nav Popups") | en.wikipedia.org; descends from [`User:Lupin/popups.js`](https://en.wikipedia.org/wiki/User:Lupin/popups.js) | | [`MediaWiki:Gadget-navpop.css`](https://en.wikipedia.org/wiki/MediaWiki:Gadget-navpop.css) — the gadget's stylesheet (second half of the `Navigation_popups` gadget definition) | en.wikipedia.org | To add another: `... add ''` (writes an entry to `mwsync.yaml`). ### `nav-popups/` layout Each tracked page gets a dir holding two copies — the pristine upstream and the one we maintain: ``` nav-popups/ upstream/popups.js # pristine upstream snapshot (mwsync `local`; revid in mwsync.yaml). # `mwsync merge` refreshes it in place. Don't hand-edit. upstream/navpop.css # pristine snapshot of the gadget CSS (same rules). popups.js # LIVE: our maintained version — edit here, keep updating, # include elsewhere. Diff against upstream/ to see our deltas. # The LIVE copy of the CSS is *embedded* here (see below); # there is no live navpop.css. ``` Local modifications in the live copy are marked with `// LOCAL MOD (mcint/userscripts)` comments (each quoting the upstream original), so the delta vs `upstream/popups.js` stays legible and re-appliable after an upstream refresh. Current live deltas: - **Last-modified display** — absolute timestamp (local time, marked `(l)`; UTC in the hover tooltip) + a compact age like `2d` / `5h` / `3M` / `5y`, instead of upstream's relative "3 weeks 2 days old". (TODO: click `(l)` to toggle to UTC.) - **Embedded base stylesheet** — `NAVPOP_BASE_CSS` (live copy of `upstream/navpop.css`) is injected as `