Jump to content

User:VulcanSphere/WikidataQuality.js

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by 1997kB (talk | contribs) at 11:56, 24 April 2022 (1997kB moved page User:Vulphere/WikidataQuality.js to User:VulcanSphere/WikidataQuality.js: Automatically moved page while renaming the user "Vulphere" to "VulcanSphere"). The present address (URL) is a permanent link to this version.
(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.
$.getScript(
	'//meta.wikimedia.org/w/index.php?title=User:Arybolab/WikidataQuality-system.js&action=raw&ctype=text/javascript',
	function(){
		wikidataQuality = new WikidataQuality({
			ores_host: "https://ores.wikimedia.org",
			weights: {
				E: 1,
				D: 2,
				C: 3,
				B: 4,
				A: 5
			},
			names: {
				E: "{{class|E|image=yes}}", 
				D: "{{class|D|image=yes}}",
				C: "{{class|C|image=yes}}",
				B: "{{class|B|image=yes}}",
				A: "{{class|A|image=yes}}"
			},
			assessment_system: "ORES predicted quality",
			dbname: "wikidatawiki"
		});
		if(mw.config.get('wgAction') === "history" && (mw.config.get('wgNamespaceNumber') === 0 || mw.config.get('wgNamespaceNumber') === 118)){
			wikidataQuality.getAndRenderHistoryScores();
		}
		if(mw.config.get('wgAction') === "view" && (mw.config.get('wgNamespaceNumber') === 0 || mw.config.get('wgNamespaceNumber') === 118)){
			wikidataQuality.getAndRenderScoreHeader();
		}
		wikidataQuality.addScoresToArticleLinks();
	}
);
importStylesheetURI("//meta.wikimedia.org/w/index.php?title=User:EpochFail/ArticleQuality.css&action=raw&ctype=text/css");