User:XXN/withscript.js

mw.loader.using( ['mediawiki.util', 'mediawiki.notify'], function {	var extraCSS = mw.util.getParamValue( 'withCSS' ),		extraJS = mw.util.getParamValue( 'withscript' );

if ( extraCSS ) { // DONT REMOVE THIS IF (unless you are OK with CSRF attacks) if ( /^(User|MediaWiki):[^&<>=%#]*\.css$/.test( extraCSS ) ) { mw.loader.load( '/w/index.php?title=' + encodeURIComponent( extraCSS ) + '&action=raw&ctype=text/css', 'text/css' ); } else { mw.notify( '!!!!!!!!!!!!!', { title: 'Invalid withCSS value' } ); }	}

if ( extraJS ) { // DONT REMOVE THIS IF (unless you are OK with XSS and CSRF attacks) if ( /^(User|MediaWiki):[^&<>=%#]*\.js$/.test( extraJS ) ) { mw.loader.load( '/w/index.php?title=' + encodeURIComponent( extraJS ) + '&action=raw&ctype=text/javascript' ); } else { mw.notify( '!!!!!!!!!!!!!', { title: 'Invalid withscript value' } ); }	}

});