Inspired by @Ed6767’s Develop Wikipedia Userscripts like a Pro, I think it would be useful to have a browser extension which, when enabled, automatically loads a script from a URL like http://localhost:8080/script.js. You would develop the user script locally, run http-server (or http.server or another server of your choosing) to serve it, and the extension would automatically load the code you’re working on, so that you don’t need to save anything on-wiki to make changes take effect.
Loose collection of envisioned features:
- have an on-off switch in the browser toolbar, since people wouldn’t use this all the time; like WikimediaDebug
- the on-off switch effectively replaces adding or removing mw.loader.load( 'http://localhost:8080/script.js' ); to your common.js
- make the URL configurable to an extent (port and path, though I’m tempted to leave the localhost hard-coded)
- avoid caching of the code, e.g. by automatically adding a random parameter to the URL (seems to work in http-server and http.server, at least)
- work on all Wikimedia wikis (and the Beta cluster?)
- be installable from the Firefox and Chrome extension stores
- wait until the MediaWiki environment is available before loading the code (is typeof mw !== 'undefined' enough?)