Jump to content

User:Phlsph7/HighlightUnreferencedPassages: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Usage: update screenshots
Line 12: Line 12:
}}
}}


'''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 the [[WP:V|Wikipedia 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, as [[#Explanation and limitations|explained 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.
'''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 the [[WP:V|Wikipedia 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, as [[#Explanation and limitations|explained 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.


== Installation ==
== Installation ==
Line 31: Line 31:


== Explanation and limitations ==
== Explanation and limitations ==
According to [[WP: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 the [[Help:Reftags|reftags]] ({{nobr|<ref>...</ref>}}) or similar templates ({{tl|R}}, {{tl|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, their second half is highlighted. [[Template:Citation needed|Citation needed-tags]] are also considered.
According to [[WP: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 the [[Help:Reftags|reftags]] ({{nobr|<ref>...</ref>}}) or similar templates ({{tl|R}}, {{tl|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. [[Template:Citation needed|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. The script is not able to identify references in the deprecated [[WP:PAREN|parenthetical style]] and ignores them. It also ignores various Wikipedia policies about which passages are in need of inline references and which ones are not. For example, passages in the lead do not require references if they only summarize material that is already referenced in the body of the article, see [[MOS:CITELEAD]]. Plot summaries of works of fiction also do not require references, see [[MOS:PLOTSOURCE]]. Material that is not likely to be challenged is not in need of inline citations, see [[WP:V]] and [[WP:You don't need to cite that the sky is blue]]. For lists, some editors choose to place the references at the beginning before the list or at the last list entry. The script ignores these practices and checks each list entry individually. Additionally, the script is unable to detect whether the reference actually supports the text and whether it is reliable. Because of this, even articles that have no highlighted passages may be in violation of the Wikipedia verifiability criteria.
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 are ''not'' required to have any inline citations.
* The script is '''not able to identify some existing references''', such as those using the deprecated [[WP:PAREN|parenthetical style]]. It highlights those cited passages even though they are already cited.
* It also ignores various Wikipedia policies that say '''some passages do not need inline references'''. For example, most passages in the lead do not require references if they only summarize material that is already referenced in the body of the article; see [[MOS:CITELEAD]].
* '''Plot summaries''' of works of fiction also do not require references; see [[MOS:PLOTSOURCE]].
* Material that is '''not likely to be challenged''' is not in need of inline citations, see [[WP:V]] and [[WP:You don't need to cite that the sky is blue]].
* For '''lists''', editors frequently choose to place the references at the beginning before the list or at the last list entry. The script ignores these practices and checks each list entry individually.
* Additionally, the script is unable to detect:
** '''whether the ref tags contain a citation''' to a source (instead of being an [[Wikipedia:Explanatory footnote|explanatory footnote]]),
** '''whether the cited source actually supports the text''', and
** '''whether the cited source is reliable'''. {{pb}}Because of these limitations, even articles that have no highlighted passages may be in violation of the Wikipedia verifiability criteria.


== Screenshots ==
== Screenshots ==

Revision as of 17:25, 9 February 2023

User script
Highlight unreferenced passages
DescriptionUses a red background color to highlight each passage that lacks references.
Author(s)Phlsph7
First releasedJanuary 28, 2023; 21 months ago (2023-01-28)
UpdatedJuly 19, 2024
    (3 months ago)
Browsersall modern browsers
Skinsall skins
SourceUser: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 the Wikipedia 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, as explained 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.

Installation

To install this script, go to your 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 at User_talk:Phlsph7/HighlightUnreferencedPassages.

Usage

After the script is installed, it can be accessed via the toolbox by clicking on the link "Highlight unreferenced passages".

Access the script by clicking on the link "Highlight unreferenced passages" in the toolbox. Left: toolbox in the old Wikipedia skin (Vector 2010). Right: toolbox in the new Wikipedia skin (Vector 2022).

Explanation and limitations

According to WP: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 the reftags (<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 are not required to have any inline citations.

  • The script is not able to identify some existing references, such as those using the deprecated parenthetical style. It highlights those cited passages even though they are already cited.
  • It also ignores various Wikipedia policies that say some passages do not need inline references. For example, most passages in the lead do not require references if they only summarize material that is already referenced in the body of the article; see MOS:CITELEAD.
  • Plot summaries of works of fiction also do not require references; see MOS:PLOTSOURCE.
  • Material that is not likely to be challenged is not in need of inline citations, see WP:V and WP:You don't need to cite that the sky is blue.
  • For lists, editors frequently choose to place the references at the beginning before the list or at the last list entry. The script ignores these practices and checks each list entry individually.
  • Additionally, the script is unable to detect:
    • whether the ref tags contain a citation to a source (instead of being an explanatory footnote),
    • whether the cited source actually supports the text, and
    • whether the cited source is reliable.
      Because of these limitations, even articles that have no highlighted passages may be in violation of the Wikipedia verifiability criteria.

Screenshots