MediaWiki:Gadget-PageNumbers.js

/** * PageNumbers loader * * Loads the dynamic layouts module on suitable pages */ $( function ( $ ) {	var disabledTitle = [ 'Main Page' ].indexOf( mw.config.get( 'wgTitle' ) ) !== -1;	var nsOK = [ 0, 114 ].indexOf( mw.config.get( 'wgNamespaceNumber' ) ) !== -1;	// disable on the mobile skins (actually the mobile doesn't serve this gadget at all, but // this makes testing easier)	var skinOk = [ 'minerva' ].indexOf( mw.config.get( 'skin' ) ) === -1;

if ( !disabledTitle && nsOK && skinOk ) { mw.loader.load( 'ext.gadget.PageNumbers-core' ); } } );