User:MPGuy2824/scripts/getOresScores.js

/****************************************************************************** GetOresScores -- A script to get the ORES scores of the latest revision of the article $.when(	// Resource loader modules	mw.loader.using( [ 'mediawiki.util' ] ),	// Page ready	$.ready ).then( function( require ) {	var getORESAPI = function( revisionId ) {		return "https://ores.wikimedia.org/v3/scores/enwiki/" + 			revisionId + "/articlequality";	};

// Only for article, draft and user namespaces if( [ 0, 2, 118 ].indexOf( mw.config.get( "wgNamespaceNumber" ) ) !== -1 ) { mw.util.addPortletLink(			'p-navigation',			getORESAPI( mw.config.get( 'wgCurRevisionId' ) ),			'ORES Scores',			't-ores',			'A link for the ORES Scores',			null,			null		); } });