Normally we develop and test new code against test instances of mediawiki (on the dev's local machine, patch demo etc).
This has several drawbacks, e.g.:
- The test instances are often quite unlike live ones in terms of content, extensions, accounts etc.
- We can copy data, config etc, but sometimes this can be laborious and/or require large amounts of storage.
- Sometimes we'd want to test against the data from many different instances (e.g. for language-related issues).
Sometimes it would be helpful to run and test new code on a live mediawiki instance without deploying the code there. That is, to be able to point your web browser at the live mediawiki instance, but then pull in some new code from elsewhere. Note that the live mediawiki instance would remain 100% unchanged — the changed code is something you'd only have in your local browser.
One solution is a bookmarklet that hooks into ResourceLoader and changes the sources of particular modules, *before* they get loaded. This would be tricky if the modules were loaded on page load; but happily they are not. The (visual) edit button on a page calls mw.libs.ve.activateVe() which then loads the modules. So there's a natural opportunity to click a bookmarklet instead of clicking edit.