User:BPositive/alignTranslations.js

mw.loader.using( ['jquery.ui.dialog', 'mediawiki.api'], function {

var api_1 = new mw.Api; api_1.get ({	       action:'parse',	        prop: 'sections',	        format: 'json',	        page: 'Extension:ParserFunctions'	    }).done ( function( data ) {	    	var sourceSections = data.parse.sections;	    	console.log("Source language sections are:");    		for(var i=0; i < sourceSections.length; i++){    			console.log(sourceSections[i].line);    		}	    }); var api_2 = new mw.Api; api_2.get ({	       action:'parse',	        prop: 'sections',	        format: 'json',	        page: 'Extension:ParserFunctions/pl'	    }).done ( function( data ) {	    	var translatedSections = data.parse.sections;	    	console.log("Translated language sections are:");    		for(var i=0; i < translatedSections.length; i++){    			console.log(translatedSections[i].line);    		}	    }); });