| Highlight unreferenced passages | |
|---|---|
| Description | Uses a red background color to highlight each passage that lacks references. |
| Author | Phlsph7 |
| First released | January 28, 2023; 3 years ago (2023-01-28) |
| Updated | July 19, 2024 (18 months ago) |
| Browsers | all modern browsers |
| Skins | Vector (2022), Vector legacy (2010), MinervaNeue |
| Source | User:Phlsph7/HighlightUnreferencedPassages.js |
Highlight unreferenced passages is a user script to highlight passages that lack references with a red background. Its main purpose is to help users quickly identify unreferenced passages, paragraphs, and sections in mainspace articles and drafts. It can be used both by reviewers trying to assess whether an article complies with theWikipedia verifiability criteria and by editors looking for passages that need to be improved. It does not alter the article in any way; it only affects how it is displayed. Please keep in mind that this tool has various limitations, asexplained below. For example, it ignores various Wikipedia policies about which claims need inline citations and which ones do not. If a passage is highlighted, it only means that there could be a problem, not that there definitely is a problem. In this regard, the script is not meant to replace human judgment but only to assist users in finding passages that may need references.
To install this script, go toyour common.js and add the following line:
importScript('User:Phlsph7/HighlightUnreferencedPassages.js');// Backlink: [[User:Phlsph7/HighlightUnreferencedPassages.js]]
If you run into problems or have suggestions on how to improve the script, please discuss them atUser_talk:Phlsph7/HighlightUnreferencedPassages.
After the script is installed, it can be accessed via the toolbox by clicking on the link "Highlight unreferenced passages".
According toWP:Verifiability, "all material must be attributable to reliable, published sources" and "any material challenged or likely to be challenged must be supported by inline citations." Inline citations are usually placed after a passage to support it. This normally happens using thereftags (<ref>...</ref>) or similar templates ({{R}},{{sfn}}, ...). The script identifies whether a reference is placed after a passage, either immediately after it or after the next few sentences. Paragraphs that contain no references are fully highlighted. For paragraphs that contain a reference only in the middle but not at the end, everything after the reference is highlighted.Citation needed-tags are also considered.
The script has various limitations. Because of them, a highlighted passage only indicates that attention is required since there may be a problem. Most of these limitations result in highlighting sections that arenot required to have any inline citations.