Jump to content

User:Polygnotus/DuplicateReferences

From Wikipedia, the free encyclopedia

This script detects and displays references with duplicate URLs. It also calculates how similar the visible text of those references is as a percentage. Hovering over and clicking on the reference number highlights it and its duplicates. You can add a {{Duplicate citations}} template to the page by clicking the link next to the References section header.

DuplicateReferences
DescriptionDetects and displays duplicate URLs in the references section of Wikipedia articles
Author(s)Polygnotus
UpdatedJuly 28, 2024
    (0 days ago)
SourceUser:Polygnotus/DuplicateReferences.js

Duplicate References script

Installation

[edit]

First install User:Enterprisey/script-installer, then come back to this page and click the giant blue "Install" button in the infobox on the right.

Or install it manually by adding the below code to your Special:MyPage/common.js file:

{{subst:iusc|User:Polygnotus/DuplicateReferences.js}}

You can test the script over at User:Polygnotus/dupreftest.

Functionality

[edit]
  • Displays a table containing any duplicate URLs in the References section
  • Shows similarity calculation of the text of duplicate references
  • Adds a "add {{Duplicated citations}}" link to the References section header (if that template is not present). Clicking on it adds the template to the page (with explanatory editsummary).
  • Hovering over the reference number highlights it and its duplicates
  • Clicking the reference number highlights it and its duplicates
  • Stores collapsed/expanded state in localStorage

Limitations

[edit]
  • Compares the visible text in each reference; not the exact HTML (because that would give incorrect results)