User:Praxidicae/sourcescript.js

// Instructions available at User:Headbomb/unreliable // Feel free to request tweaks or additional sources to be covered on the talk page // Sources from Prax added by LakesideMiners. // Backlink User:Headbomb/unreliable.js // Adapted from https://en.wikipedia.org/w/index.php?title=Wikipedia:User_scripts/Requests&diff=939432100&oldid=939403363 by User:SD0001 // Updated from https://en.wikipedia.org/w/index.php?title=User:Jorm/unreliable.js&oldid=940556311 by User:Jorm // Updated from https://en.wikipedia.org/w/index.php?title=User:SD0001/unreliabe.js&oldid=941114456 by User:SD0001

// Unreliable websites based on WP:RSPSOURCES (mostly) // Unreliable publishers/journals based on WP:CITEWATCH (mostly)

// \/ regex in links doesn't work as it should, use (%2F|\/) instead $( function {

const rules = [ // Blacklisted sources {			regex: /\b(?:test\.blacklist\.org|112\.international|112\.ua|breitbart\.com|city-data\.com|dan-news\.info|examiner\.com|famousbirthdays\.com|globalresearch\.ca|infowars\.com|infowars\.net|infowars\.tv|lenta\.ru|liveleak\.com|lulu\.com|mylife\.com|naturalnews\.com|news-front\.info|newswar\.com|newswars\.com|reunion\.com|rusdialog\.ru|southfront\.org|thepointsguy\.com|topwar\.ru|ukraina\.ru|veteransnewsnow\.com|veteranstoday\.com|zoominfo\.com)/, css: { "background-color": "#dddddd", "text-decoration":"underline", "text-decoration-style": "wavy", "text-decoration-color": "#cc0000"} },

// Deprecated sources {			regex: /\b(?:test\.deprecated\.org|campaignlifecoalition\.com|crunchbase\.com|dailycaller\.com|dailymail\.co\.uk|dailymail\.com|hispantv\.com|hispantv\.ir|last\.fm|lifesitenews\.com|mintpressnews\.com|nationalenquirer\.com|newsoftheworld\.co\.uk|nndb\.com|oann\.com|occupydemocrats\.com|rateyourmusic\.com|takimag\.com|telesurenglish\.net|telesurtv\.net|theepochtimes\.com|thegatewaypundit\.com|thesun\.co\.uk|vdare\.com|wnd\.com|worldnetdaily\.com)/, css: { "background-color": "#ffbbbb", "text-decoration":"underline", "text-decoration-style": "wavy"}, },

// Generally unreliable sources {				regex: /\b(?:test\.generallyunreliable\.org|alternet\.org|amazon\.com|amren\.com|ancestry\.com|angelfire\.com|angelfire\.lycos\.com|answers\.com|askubuntu\.com|baike\.baidu\.com|bild\.de|bipartisanreport\.com|bircham\.edu|blogger\.com|bloodandhonourcentral\.co\.uk|bloodandhonourworldwide\.co\.uk|celebritynetworth\.com|centerforfoodsafety\.org|cesnur\.org|cnsnews\.com|coindesk\.com|conservativereview\.com|conservativetribune\.com|cracked\.com|dailykos\.com|dailymotion\.com|dailystar\.co\.uk|dailywire\.com|deanradin\.com|deanradin\.org|discogs\.com|electronicintifada\.net|ewg\.org|explorejournal\.com|express\.co\.uk|facebook\.com|familysearch\.org|fandom\.com|fb\.com|findagrave\.com|findmypast\.co\.uk|foodandwaterwatch\.org|force9\.co\.uk|fwwatch\.org|gawker\.com|geni\.com|geocities\.com|goodreads\.com|guacamoley\.com|heatst\.com|ibtimes\.com|imdb\.com|indiahealthguru\.com|indymedia\.org|instagram\.com|jezebel\.com|lenr-canr\.org|liberty\.edu|linkedin\.com|livejournal\.com|marquiswhoswho\.com|mathoverflow\.net|mediabiasfactcheck\.com|medium\.com|metro\.news|mruniversity\.com|neuroquantology\.com|newenergytimes\.com|onlinegatha\.com|palmerreport\.com|pan-international\.org|patheos\.com|patribotics\.com|pesticideinfo\.org|pinterest\.com|prageru\.com|presstv\.com|prisonplanet\.com|quadrant\.org\.au|quillette\.com|quora\.com|reddit\.com|rootsweb\.com|rt\.com|scribd\.com|sputniknews\.com|stackexchange\.com|stackoverflow\.com|stormfront\.org|telekinesisworld\.com|theblaze\.com|thegwpf\.org|thenewamerican\.com|theonion\.com|thetruthaboutguns\.com|tunefind\.com|tvtropes\.org|twitch\.tv|twitter\.com|urbandictionary\.com|venezuelanalysis\.com|vgchartz\.com|vimeo\.com|vixra\.org|westernjournal\.com|whosampled\.com|wikia\.com|wikia\.org|wikileaks\.org|wonkette\.com|wordpress\.com|worldtruth\.tv|youtube\.com|zerohedge\.com|avn\.org\.au|childrenshealthdefense\.org|cmsri\.org|collective-evolution\.com|davidwolfe\.com|drtenpenny\.com|foodbabe\.com|greenmedinfo\.com|healthnutnews\.com|i-sis\.org|medicalveritas\.com|mercola\.com|modernalternativehealth\.com|modernalternativemama\.com|momsacrossamerica\.com|naturalnews\.com|nvic\.org|organicconsumers\.org|peteevans\.com|realfarmacy\.com|townsendletter\.com|tldp\.com|wddty\.com|sixthtone\.com|thepaper\.cn|flickr\.com|tumblr\.com)/, css: { "background-color": "#ffdddd" }, },

// Wikimedia-related websites {			filter: mw.config.get('wgNamespaceNumber') === 0 || mw.config.get('wgNamespaceNumber') === 118, regex: /\b(?:test\.wiki\.org|wikidata\.org|wikinews\.org|wikipedia\.org)/, css: { "background-color": "#ffdddd" }, },

// Predatory. See Special:AbuseFilter/891, WP:CITEWATCH/SETUP, User:JzG/Predatory and https://beallslist.net/ {			regex: /\b(?:test\.predatory\.org|\.iiis\.org|\.ssjournals\.com|academicjournals\.com|academicjournals\.net|academicjournals\.org|academicpub\.org|academicresearchjournals\.org|aiac\.org\.au|aicit\.org|aijcrnet\.com|aijssnet\.com|alliedacademies\.org|arcjournals\.org|ashdin\.com|aspbs\.com|avensonline\.org|biomedres\.info|biopublisher\.ca|bowenpublishing\.com|ccsenet\.org|cennser\.org|clinmedjournals\.org|cluteinstitute\.com|cosmology\.com|cpinet\.info|cscanada\.net|currentpediatrics\.com|davidpublisher\.org|esciencecentral\.org|etpub\.com|eujournal\.org|grdspublishing\.org|growingscience\.com|hanspub\.org|hoajonline\.com|hrmars\.com|iacsit\.org|iamure\.com|idosi\.org|igi-global\.com|iises\.net|iiste\.org|ijarbs\.com|ijastnet\.com|ijbhtnet\.com|ijbssnet\.com|ijddr\.in|ijhssnet\.com|ijllnet\.com|imedpub\.com|informaticsjournals\.com|innspub\.net|intechopen\.com|intechweb\.org|interesjournals\.org|internationaljournalssrg\.org|ispacs\.com|ispub\.com|jalsnet\.com|jaypeebrothers\.com|jaypeejournals\.com|jbepnet\.com|jespnet\.com|journalofcosmology\.com|jpmedpub\.com|julypress\.com|juniperpublishers\.com|kowsarpub\.com|kspjournals\.org|m-hikari\.com|macrothink\.org|mecs-press\.org|medwelljournals\.com|oapublishinglondon\.com|oatext\.com|omicsgroup\.org|omicsonline\.org|oprscience\.org|ospcindia\.org|researchleap\.com|researchpub\.org|sapub\.org|scholink\.org|scialert\.net|scidoc\.org|sciedu\.ca|sciencedomain\.org|sciencedomains\.org|sciencepg\.com|sciencepub\.net|sciencepubco\.com|sciencepublication\.org|sciencepublishinggroup\.com|scientificjournals\.org|sciepub\.com|scipg\.net|scipress\.com|scirp\.org|scitechnol\.com|scopemed\.com|seipub\.org|sersc\.org|sphinxsai\.com|thesai\.org|valleyinternational\.net|waset\.org|witpress\.com|worldsciencepublisher\.org|worldwidejournals\.com|wscholars\.com|wseas\.org|wudpeckerresearchjournals\.org|zantworldpress\.com|zenithresearch.org\.in|oapub\.org|medcraveonline\.com|journalissues.\org|rjlbpcs\.com)/, css: { "background-color": "#ffbbbb", "text-decoration":"underline", "text-decoration-style": "wavy"}, },		{ 			regex: /\b10\.(?:0001|11648|1166|1234|12677|12692|12720|12988|13005|13172|13188|14257|14299|14303|14419|14445|1453|14569|14662|15415|15373|15680|15761|17265|18005|18052|18311|18775|19030|19044|19070|19080|1999|20319|20431|20472|20849|20902|21102|21767|22158|23937|29322|2495|30845|35841|36648|3844|3923|3968|4018|4156|4172|4236|4303|5005|5267|5296|5376|5430|5455|5539|5567|5580|5772|5812|5815|5829|5897|5899|5923|5963|6007|6479|7243|7439|7537|7575|7718|7763|9734|22192|18535)\b/, css: { "background-color": "#ffbbbb", "text-decoration":"underline", "text-decoration-style": "wavy"}, },

// Sources that traditionally fail WP:MEDRS, but which could be used for other more routine claims {			regex: /\b(?:test\.medrs\.org|benthamopen\.com|f1000\.com|frontiersin\.org|mdpi\.com)/, css: { "background-color": "#fffdd0" } },		{			regex: /\b10\.(?:0002|2174|3389|3390|3410|4089|4175|7490|12688|12703|20944|32545|35995)\b/, css: { "background-color": "#fffdd0" } },

// May or may not contain preprints, predatory, or self-published materials {			regex: /\b(?:test\.warn\.org|academia\.edu|arxiv\.org|biorxiv\.org|chemrxiv\.org|citeseerx\.ist\.psu\.edu|cureus\.com|docs\.google\.com|e-century\.org|eartharxiv\.org|figshare\.com|medrxiv\.org|osf\.io\/preprints|peerj\.com\/preprints|psyarxiv\.com|pulsus\.com|researchgate\.net|ssrn\.com|zenodo\.org)/, css: { "background-color": "#fffdd0" }, },		{			regex: /\b10\.(?:0003|1101(%2F|\/)\d+|2139|7287|4066|5281|5604|6084|7759|13140|19144|20935|21282|31219|31220|31221|31222|31223|31224|31225|31226|31227|31228|31229|31230|31231|31232|31233|31234|31235|31236|31237|1016(%2F|\/)j\.chaos\.|1016(%2F|\/)S0960-0779)\b/, css: { "background-color": "#fffdd0" }, },

// Varies with the contributor or topic {			regex: /\b(?:test\.contributors\.org|aa\.com\.tr|forbes\.com|foxnews\.com|huffpost\.com)/, css: { "background-color": "#fffdd0" }, },		{		 regex: /\b(?:test\.prax\.org|famousbirthsdeaths\.com|arizonadailyregister\.com|healthynewage\.com|tunf\.com|newstrail\.com|ventsmagazine\.com|dailyscanner\.com|nykdaily\.com|watershapes\.com|filmdaily\.co|ritzherald\.com|voyagephoenix\.com|javamagaz\.com|thelaudablepursuit\.com|icharts\.net|themindunleashed\.com|internationalmusicmagazine\.com|paperplane\.pk|bloody-flicks\.co\.uk|enews20\.com|musictalkers\.com|digitaljournal\.com|icharts\.net|butterflylabs\.com|abc-of-snowboarding\.com|seriable\.com|opptrends\.com|thefrisky\.com|revenuesandprofits\.com|demotix\.com|dailytimes\.com\.pk|dnd\.com\.pk|oneworldherald\.com|californiaherald\.com|tricitydaily\.com|theamericanreporter\.com|londondailypost\.com|vernamagazine\.com|residentweekly\.com|openthenews\.com|healthmassive\.com|californiatimes\.us|tribunebyte\.com|allnewsbuzz\.com|apstersmedia\.com|newyorkheadlines\.us|voyagela\.com|sdvoyager\.com|exactobserver\.com|sunrisenews\.co|uaenews247\.com|filmdaily\.co|celebslifereel\.com|businessday\.ng|fabworldtoday\.com|coveragelog\.com|Healthyceleb\.com|demotix\.com|techozen\.com|articleify\.com|foreignpolicyi\.org|thefashionisto\.com|bel-india\.com|latestly\.com|thriveglobal\.com|khaleejtimes\.com|gravatar\.com|bigtimedaily\.com|gtainside\.com|empower-mag\.com|london-post\.co\.uk|isstories\.com|bestinau\.com\.au|seekerstime\.com|explosion\.com|dailymusicroll\.com|timebusinessnews\.com|sweetstartups\.com|ccdiscovery\.com|foreignpolicyi\.org|carsoid\.com|hiboox\.com|vermontrepublic\.org|empiremovies\.com|thewashingtonnote\.com|norsecorp\.com|officialroyalwedding2011\.org|bel-india\.com|comeaucomputing\.com|weirdworm\.com|earthnworld\.com|timeslifestyle\.net|atlnightspots\.com|whiteoutpress\.com|growingmagazine\.com|foreignpolicyi\.org|insiderquest247\.com|dailytimes4u\.com|morningtimestoday\.com)/, css: { "background-color": "#FF00FF" }, }

];

// Check each external link on the page against each regex $('.mw-parser-output a.external').each(function(_, link) {		$.each(rules, function(_, rule) { if (typeof rule.filter !== 'undefined' && !rule.filter) { return true; }			if (rule.regex.test(link.href)) { $(link).css(rule.css); return false; }		});	});

// Check list items against each regex to catch further reading/bibliography items without links $('.mw-parser-output ul li, .mw-parser-output ol:not(.references) li, .reference-text:not(:has(a))') .each(function(_, li) {		$.each(rules, function(_, rule) { if (typeof rule.filter !== 'undefined' && !rule.filter) { return true; }			if (rule.regex.test(li.textContent)) { $(li).css(rule.css); return false; }		});	});

} );