Jump to content

User:Xaradnam/monobook.js: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Xaradnam (talk | contribs)
m -
Xaradnam (talk | contribs)
m test
Line 1: Line 1:
// <nowiki>
DiffOnly = "history";
mw.loader.using( 'mediawiki.Uri' ).done(function(){
importScript('User:Mr. Stradivarius/gadgets/DiffOnly.js');
var mwConfig = mw.config.get( [
'wgAction',
'wgCanonicalSpecialPageName'
] );


CurPg=mw.config.get('wgPageName'); // Current page name
CurNSnum=mw.config.get('wgNamespaceNumber');
//==================================================
function printValue(txt, val)
{$('body').append('<center><h4><tt>' + txt + ': ' + val + ' </tt></h4></center>');}
//==================================================
if (CurPg=="User:Xaradnam/monobook.js") printValue("CurPg", CurPg);

printValue('wgAction', mwConfig.wgAction)
});

Revision as of 21:39, 24 October 2021

// <nowiki>
mw.loader.using( 'mediawiki.Uri' ).done(function(){ 
	var mwConfig = mw.config.get( [
		'wgAction',
		'wgCanonicalSpecialPageName'
	] );


CurPg=mw.config.get('wgPageName'); // Current page name
CurNSnum=mw.config.get('wgNamespaceNumber');
//==================================================
function printValue(txt, val)
	{$('body').append('<center><h4><tt>' + txt + ': ' + val + ' </tt></h4></center>');}
//==================================================
if (CurPg=="User:Xaradnam/monobook.js") printValue("CurPg", CurPg);

printValue('wgAction', mwConfig.wgAction)
});