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',        'u:dev:MediaWiki:PageCreator/code2.js',        'u:dev:MediaWiki:LastEdited/code.js',       ] });

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

var un = new mw.Api.get( {     action: 'query',      titles: mw.config.get( 'wgPageName' ),      prop: 'revisions',      rvslots: '*',      rvprop: 'user',      format: 'json',      formatversion: '2'    } ).done( function ( data ) {      return data['query']['pages'][0]['revisions'][0]['user']    } );

var unp = 'User:' + un + ''; var c = function ( k, u ) { if ( k.indexOf( u ) !== null ) { document.getElementById('Kylorne').html('  This article concerns the world of Kylorne. Please refrain from making any edits to the article if you are not a player on Kylorne.Articles concerning Kylorne are subject to different rules than regular articles. Please contact Kylorne staff instead of wiki staff for any questions related to Kylorne articles.    ')			}			else if ( k.indexOf( u ) === null ) {			  document.getElementById('Kylorne').html('  This article concerns the world of Kylorne. It has been edited by a user not verified as being whitelisted on Kylorne.Please contact a member of Kylorne staff to reverse the edits by unverified users.    ')			}		};    c ( ky, unp ); }));