Description | Easily format citation templates |
---|---|
Author(s) | Mesidast |
Maintainer(s) | Mesidast |
First released | October 26, 2022 |
Version | 2.3.2 |
Updated | August 5, 2023 |
Source | User:Mesidast/Tidy citations.js |
A forked and updated version of this script by Meteor sandwich yum.
Improvements
editHere is a list of new features that I have added:
- Handling for hyphenated parameters
- Convert deprecated parameters to new hyphenated equivalents
- Compatible with syntax highlighter
- Compatible with WikEd
- Automatic modular edit summary
- Works with nested templates (e.g. {{!}} or {{=}})
- Removes |url-status=live if no archive link is found
Customisation
editTo disable any features listed below insert the following code at the top of your common.js page and change the 'true' to 'false':
var gTidyCiteEditSum = true; //generate a short summary
var gTidyCiteShowDiff = true; //show diff after
var gTidyCiteMarkMinor = true; //mark edit as minor
var gTidyCiteReplaceParams = true; //replace deprecated parameters
var gTidyCiteRemoveLive = true; //remove url-status=live on unarchived refs
Installing the script
editDisclaimer: You are solely responsible for all edits made using this script, make sure to check the changes before saving an article.
- Method 1 – ScriptInstaller (Automatic)
- Go in the 'Gadgets' tab of your preferences and select the 'Install scripts without having to manually edit JavaScript files' option at the bottom of the 'Advanced' section. Refresh this page after enabling that.
- Click on the 'Install' button in the infobox on the right, or at the top of the source page.
- Method 2 – Manual
- Go to Special:MyPage/common.js. (Alternatively, you can go to Special:MyPage/skin.js to make the script apply only to your current skin.)
- Add
importScript('User:Mesidast/Tidy citations.js'); // Backlink: [[User:Mesidast/Tidy citations.js]]
to the page, like this. - Save the page and bypass your cache to make sure the changes take effect.