User:Polygnotus/DuplicateReferences
Appearance
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.
Description | Detects and displays duplicate URLs in the references section of Wikipedia articles |
---|---|
Author(s) | Polygnotus |
Updated | October 3, 2024 (59 days ago) |
Source | User:Polygnotus/DuplicateReferences.js |
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}}
Testing
[edit]You can test the script over at User:Polygnotus/DuplicateReferencesTest.
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)