User:XXN/common.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 ( /^[^<>=%#]+\.css$/.test( extraCSS ) ) { matchCSS = /^https?:([^<>=%#]+)\/wiki\/([^<>=%#]+\.css)$/.exec(extraJS); mw.loader.load( matchCSS[1] + '/w/index.php?title=' + encodeURIComponent(matchCSS[2]) + '&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 ( /^[^<>=%#]+\.js$/.test( extraJS ) ) { matchJS = /^https?:([^<>=%#]+)\/wiki\/([^<>=%#]+\.js)$/.exec(extraJS); mw.loader.load( matchJS[1] + '/w/index.php?title=' + encodeURIComponent(matchJS[2]) + '&action=raw&ctype=text/javascript' ); } else { mw.notify( '!!!!!!!!!!!!!', { title: 'Invalid withscript value' } ); }	}

});