The larger task is to change how https://en.wikipedia.org/wiki/MediaWiki:Gadget-citations.js works so that it makes an API request to the Tool Labs code rather than using a click-jacking hack.
Change the gadget code so it makes some sort of API request (possibly XHR, but that may run into same-origin problems). The gadget should submit either the article text or article title (as is done with doibot.html) and should get back the updated wikitext of the article. It should then load an edit window with the resulting edit summary and page text. This should be relatively easy for someone who's good with onwiki JS, but probably considerably harder for someone who's learning.
Acceptance criteria:
- Gadget function is maintained. User clicks "Citations" button, waits, is directed to a diff preview page pre-filled with the bot-generated expanded wikitext and edit summary.
- Gadget calls the new Citation bot API, or a mock one if the real one has not been written yet (probably using JSONP to get around single-origin requirements), gets back wikitext + edit summary
- Gadget does not clickjack. :P