User:EpochFail/DemoScriptOnDiffPage.js

if(mw.config.get("wgDiffNewId") !== null){ $('#siteSub') .append($(" ")			.text("Is this edit vandalism?")			.css("border", "1px solid black")) .append($(" ").text("Yes")) .append($(" ").text("No")); $.ajax({		url: "https://ores.wikimedia.org/v3/scores/enwiki",		data: {			'context': "enwiki",			'models': "goodfaith|damaging",			'revids': mw.config.get("wgDiffNewId")		},		timeout: 30 * 1000, // 30 seconds		dataType: 'json',		type: 'GET'	}) .done( function ( result, textStatus, jqXHR ) {			var scores = result['enwiki']['scores'][mw.config.get("wgDiffNewId")]			$('#siteSub').append( $(' ').text("ORES output:") .append($(" ").text("Damaging: " + JSON.stringify(scores['damaging']))) .append($(" ").text("Goodfaith: " + JSON.stringify(scores['goodfaith']))));		} ); }