User:Praveenvignesh/common.js

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

var person='';

$("table.persondata tbody tr").each( function { var temp = $(this).text; person = person + temp; } );

if(person!='') {

var wikitex=""; var api = new mw.Api; api.get( {   action: 'parse',    prop: 'wikitext',    page: mw.config.get( 'wgPageName' ) } ) .done( function ( data ) {       wikitex=data.parse.wikitext['*'];        alert(wikitex); } ) .fail( function ( error ) {       console.log( 'API failed :(', error ); } );

}

var str=' Edit persondata here: &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ';

$("body").append(str);

} );