I wanted more options than User:Waldyrious/formatcitations.js (doc) gave, so I tweaked it to my taste.

The script's a function to format citations with regular, uniform whitespace—useful for very messy citations that need ordering. I tested it with all skins and found no errors.
The major difference is that it appears in the p-toolbar area rather than the p-cactions area.

If WP:WIKED is installed, Tidy citations will not work.

Installation

Add the following line of code to your javascript page (with the linkback comment to help me see how many people use this):

importScript('User:Meteor sandwich yum/Tidy citations.js'); //Linkback: [[User:Meteor sandwich yum/Tidy citations.js]]

Then bypass your cache to see the results. It should appear only after you hit "edit" on a given page.

Optional parameters

The value given is default, and can be changed by adding a line of code after the importScript that overrides this.

Contact

If you've noticed a bug, have suggestions for improvement, etc. either post it on the talk page or leave me a message. All comments/suggestions welcome!