User:Metagall/common.js

// Imports importArticles ({   type:'script',    articles:       [        'u:dev:MediaWiki:AjaxBatchDelete.js',        'u:dev:MediaWiki:AjaxBatchUndelete.js',        'u:dev:MediaWiki:MarkForDeletion/code.js',        'u:dev:MediaWiki:Nuke/code.js',        'u:dev:MediaWiki:MassProtect/code.js',        'u:dev:MediaWiki:UploadMultipleFiles.js',        'u:dev:MediaWiki:RevisionDelete.js',        'u:dev:MediaWiki:ListFiles/code.js',

] });

// $(mw.loader.using(['mediawiki.util', 'mediawiki.api'], function { var api = new mw.Api.get( {   action: 'query',    titles: 'Template:Kylorne/list',    prop: 'revisions',    rvslots: '*',    rvprop: 'content',    format: 'json',    formatversion: '2' } ).done( function ( data ) {    document.getElementById('demo').textContent = data['query']['pages'][0]['revisions'][0]['slots']['main']['content']; } )

function { var api = new mw.Api.get( {   action: 'query',    titles: 'Template:Kylorne/list',    prop: 'revisions',    rvslots: '*',    rvprop: 'user',    format: 'json',    formatversion: '2' } ).done( function ( data ) {    document.getElementById('demo2').textContent = data['query']['pages'][0]['revisions'][0]['user']; } );

}) );