User:PorkchopGMX/testcases.js

// Testing area for JS. Even though I’m not that good in // JS, I might still do JS stuff here. // START TESTING AREA

// Editintros (from MediaWiki:Common.js function addEditIntro( name ) {	$( '.mw-editsection, #ca-edit, #ca-ve-edit' ).find( 'a' ).each( function ( i, el ) { el.href = $( this ).attr( 'href' ) + '&editintro=' + name; } ); }

if ( mw.config.get( 'wgNamespaceNumber' ) === 0 ) { $( function {		if ( document.getElementById( 'disambigbox' ) ) {			addEditIntro( 'Template:Disambig_editintro' );		}	} );

$( function {		var cats = mw.config.get('wgCategories');		if ( !cats ) {			return;		}		if ( $.inArray( 'Living people', cats ) !== -1 || $.inArray( 'Possibly living people', cats ) !== -1 ) {			addEditIntro( 'Template:BLP_editintro' );		}	} ); } // End editintros

// END TESTING AREA