User:Mesidast/Tidy citations

Source: Wikipedia, the free encyclopedia.
Tidy Citations.js
DescriptionEasily format citation templates
Author(s)Mesidast
Maintainer(s)Mesidast
First releasedOctober 26, 2022; 17 months ago (2022-10-26)
Version2.3.2
UpdatedAugust 5, 2023; 8 months ago (2023-08-05)
SourceUser:Mesidast/Tidy citations.js

A forked and updated version of this script by Meteor sandwich yum.

Improvements

Here 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

To 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

Disclaimer: 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)
  1. 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.
  2. Click on the 'Install' button in the infobox on the right, or at the top of the source page.
Method 2 – Manual
  1. Go to Special:MyPage/common.js. (Alternatively, you can go to
    skin
    .)
  2. Add importScript('User:Mesidast/Tidy citations.js'); // Backlink: [[User:Mesidast/Tidy citations.js]] to the page, like this.
  3. Save the page and bypass your cache to make sure the changes take effect.