Jump to content

User:Novem Linguae/Scripts/CiteHighlighter.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Novem Linguae (talk | contribs) at 12:19, 4 February 2021 (+). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//<nowiki>
/*
	PURPOSE:
	- Color code citations in the {{reflist}} based on their reliability.
	
	TO INSTALL:
	- Copy paste the below into your User:YourUserName/common.js file
			importScript('User:Novem Linguae/Scripts/CiteHighlighter.js'); // Backlink: [[User:Novem Linguae/Scripts/CiteHighlighter.js]]
	
	TODO:
	- Put the sources in a separate file. Load it with mw.loader.getScript('/w/index.php?title=User:'...
	- Instead of displaying an icon, it highlights the entire line green/yellow/red.
	- Incorporate sources from
		- WP:RSP
		- WP:NPPSG
		- WP:CRAPWATCH
		- Newspaper of record
*/

if( jQuery !== undefined && mediaWiki !== undefined ) {
	mw.loader.using(['mediawiki.util','mediawiki.Uri', 'mediawiki.Title'], function() {
		mw.util.addCSS('.external[href*="youtube.com"] {color: red !important;}');
	});
}
//</nowiki>