User:NKohli (WMF)/common.js

// Page title var gPageName = mw.config.get('wgPageName');

// Gives us the most current revision ID for the page var gCurRevisionId = mw.config.get('wgCurRevisionId');

// Action: view/query/history var gAction = mw.config.get('wgAction');

// User name var gUserName = mw.config.get('wgUserName');

// Absolute script path (defaults to /wiki) var gScriptPath = mw.config.get('wgScriptPath');

// Revision ID of right revision on diff page var gRightRevID = mw.config.get('wgRevisionID');

// Revision ID of left revision on diff page var gLeftRevID = mw.util.getParamValue('oldid');

// Page ID var gPageID = mw.config.get('wgArticleID');

function getRequest { // Making an API request code goes here }

function addSlider { // Code for adding the barebone slider goes here }

$( document ).ready( function {	// obj = getRequest;	// alert( obj );	$.ajax( { url: mw.util.wikiScript( 'api' ), data: { action: 'query', prop: 	'revisions', format: 'json', rvprop: 'ids|timestamp|user|content|comment', rvlimit:'3', titles: 'Voronezh Malshevo' },			success: function( data ) { data1 = $.getJSON( data ); console.log( typeof data1 ); //data2 = $.parseJSON( data ); //console.log( typeof data2 ); }		} ); } );