User:Novem Linguae/Scripts/CiteHighlighter

Highlights 1800 sources green, yellow, or red depending on their reliability.

Color codes

 * Dark green = Generally reliable and potentially WP:MEDRS quality
 * Light green = Generally reliable
 * Yellow = Marginally reliable or no consensus
 * Orange = Suspicious word detected in URL, such as "blog"
 * Red = Generally unreliable, deprecated, or blacklisted

Installation
Go 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:

Bugs and feature requests
Your feedback is essential. Please report all bugs and feature requests on the talk page.

Quality control
CiteHighlighter mostly uses sources that have had some kind of multi-person vetting, such as RSPSOURCES AND NPPSG (which are both based on RSN discussions), and WikiProject reliable source lists (which is a bit more hit or miss with their vetting, but hopefully they have a process, and the WikiProject members can also iterate by modifying the list page).

One exception to "multi-person vetting" is some sources I added based on frequent use in featured articles - these are assumed to be generally reliable.

Requests to add/change a source with no supporting discussion at RSN or a WikiProject page will often be declined.

Original source lists
Ratings are taken from the following sources:
 * Reliable sources/Perennial
 * New page patrol source guide
 * WikiProject Film/Resources
 * Commonly occurring sources in featured articles
 * Top 10 law reviews
 * Newspapers of record
 * List of academic preprint repositories
 * Websites from medication and chemistry infoboxes
 * WikiProject Korea/Reliable sources
 * WikiProject Video games/Sources
 * WikiProject Albums/Sources
 * WikiProject Christian music/Sources
 * WikiProject Anime and manga/Online reliable sources
 * WikiProject Tree of Life
 * WikiProject Webcomics/Sources
 * WikiProject Board and table games/Sources
 * WikiProject Latter Day Saint movement/Sources
 * WikiProject Beauty Pageants/Sources
 * WikiProject Aircraft/Engines/Reference sources
 * WikiProject Venezuela/Reliable and unreliable sources - controversial

Good, but all books, so can't detect, need websites

 * WikiProject Dungeons & Dragons/References

To examine more closely
The ideal list says if the resources are reliable, iffy, or unreliable. Some pages just list a bunch of sources with an implication that they're reliable. These may need a bit more investigation before adding.


 * WikiProject Latin music/Resources
 * List of free online resources

Categories I already added to this list

 * Category:WikiProject lists of reliable sources

Will add when time permits

 * WP:RSP - I've got most of these, but I need to turn on  and get a couple that aren't in here yet. Easiest way to do this is to add them to WP:NPPSG. Pay particular attention to the far right website column. There's some websites I need to add for existing sources too.
 * WP:RSP type pages from other language Wikipedias
 * WikiProject Professional wrestling/Sources
 * WikiProject Film/Indian cinema task force - Concerns raised about its reliability. For example Indiatimes, India Today, and IMDB should be unreliable but are not.
 * Advanced source searching
 * Record charts - some of these already added, I think some are missing though
 * WikiProject Eurovision/Sources
 * WikiProject Africa/Africa Sources List
 * WP:CITEWATCH, https://predatoryjournals.com/journals/, Special:AbuseFilter/891
 * WikiProject Arena Football League/Reliable Sources
 * WikiProject Birds/References
 * WikiProject College football/Reliable sources
 * WikiProject Comics/References
 * WikiProject Conservatism/References
 * WikiProject Film/Resources
 * WikiProject Mathematics/Reference resources
 * WikiProject Oregon/Reference desk
 * WikiProject Timeline Tracer/Reliable sources
 * WikiProject Video games/Search engine
 * WikiProject Nigeria/Nigerian sources
 * Got other ideas? Please add them here or post on talk pages

How you can contribute sources
Both of these lists are editable by YOU. Please edit wisely.
 * New page patrol source guide - Please make sure anything added here was discussed in the WP:RSN archives and had a minimum of two participants.
 * User:Novem Linguae/Scripts/CiteHighlighter/AllSourcesExceptNPPSG - Please make sure anything added here is either unarguably obvious (e.g. adding a social media site to the social media section), or originates from a somewhat vetted list (such as a WikiProject reliable sources list).

Please allow a couple weeks/months for CiteHighlighter to be updated. Someday I may have a bot do this daily, but for now I have to manually run a script.

Novem's source tools
I will run an update script every few months that parses the two pages listed above, then imports the results into CiteHighlighter. In case I go inactive or something, here are links to the tools I use.


 * User:Novem Linguae/Scripts/CiteHighlighter/SourcesJSON.js - The above two lists, combined and stripped down to just domain names.
 * Table to bulleted list tool - For parsing tables on WikiProject reliable sources pages.
 * NPPSG to array tool - I use this tool every time I update CiteHighlighter's list of sources. It has around 20 hard-coded source fixes, so if the output isn't matching the two above source lists, the code is probably changing a couple things.

TODO: These are currently manually updated by me running the NPPSG to array tool every couple months. This could be automated with a daily bot.

Tasks this tool can help with

 * Article improvement - Glance at a reflist, hone in on the red sources, and try to replace or eliminate them.
 * New page patrol / Articles for Creation - You can probably ignore red sources when evaluating if the article passes WP:GNG, and focus on evaluating the other sources.

Algorithm
CiteHighlighter looks solely at website domains. For example, if twitter.com is added to CiteHighlighter's dictionary, then it will look for links to "/twitter.com" and ".twitter.com", and then add an HTML class to them, and this class causes highlighting by changing the CSS background-color. CiteHighlighter does not look at any parameters of a citation such as publisher, ISSN, etc.

Config
Add these config settings TO THE VERY TOP of your common.js if you want to override the defaults.