ApiSandbox: Allow displaying query parameters in various formats
authorBrad Jorsch <bjorsch@wikimedia.org>
Sun, 22 Jan 2017 18:44:58 +0000 (13:44 -0500)
committerAnomie <bjorsch@wikimedia.org>
Mon, 23 Jan 2017 15:30:44 +0000 (15:30 +0000)
commitfe1e817d2af5593a54b5576dbf0005ca1e97c418
tree09fbf78e5fefcbe111c89d9c7250879e282b2c04
parentcf3deb6637cf4aab2678949e5ccec8084eec9907
ApiSandbox: Allow displaying query parameters in various formats

I9c24a230 added a box with a JSON-formatted version of the request
parmeters, saying "In the future we can provide more formats via a
dropdown". That future should have been then. It is now.

Beyond simply making it possible to select the format via a dropdown,
this change adds a JS hook, apisandbox.formatRequest, to allow adding
new formats from extensions, gadgets, and site scripts instead of
requiring them all to be added to core.

Change-Id: I20b093e0891f36cb3f1faa3eb3d6aed0f17b6b7d
languages/i18n/en.json
languages/i18n/qqq.json
resources/Resources.php
resources/src/mediawiki.special/mediawiki.special.apisandbox.css
resources/src/mediawiki.special/mediawiki.special.apisandbox.js