User:Sam Sailor/Scripts/Tidy citations

Tidy citations will harmonize spacing in citation templates or align them vertically the way infoboxes are aligned. Tidy citations should almost be run on its own, see WP:MEATBOT and WP:COSMETICBOT.

Installation instructions
Put the line

in either your common JavaScript file or the JavaScript file of your current skin, save the page, and bypass your browser cache.

August 2018 note: The function was deprecated in the July 2017 release of MediaWiki 1.29, and mw.loader is prefered. But  is not obsolete and still works, in case you prefer the old method of manually installing with  or using ScriptInstaller.

Usage
Tidy citations will add four menu items to the  when in edit mode:*

(vertically) Clicking them will harmonize citations: Some body text here. Some body text here. Some body text here. Some body text here.
 * (vertically):

wikEd compatibility
wikEd is in general incompatible with scripts, add-ons, or extensions that rely on or change the standard text edit box, and Tidy citations is one of those scripts. The workaround is to temporarily turn off wikEd by pressing the button, making the changes with Tidy citations, and re-enabling wikEd.

Feedback
Any issues? [ Click here to start a new talk section.]

Credits
This script is a modified version of User:Zyxw/Tidy citations.js (permalink), which in turn is a mod of User:Meteor sandwich yum/Tidy citations.js, which in turn is a modified version of User:Waldir/formatcitations.js.