MediaWiki:Common.js
From LostRing
/* Any JavaScript here will be loaded for all users on every page load. */
if (wgUserName=='Thebruce') alert(importScript); //importScript('MediaWiki:ContentFormatter.js');
function importScript(page){
var url=wgScriptPath + '/index.php?title=' + escape(page.replace(' ','_')) + '&action=raw&ctype=text/javascript&dontcountme=s'; var scriptElem = document.createElement('script'); scriptElem.setAttribute('src',url); scriptElem.setAttribute('type','text/javascript'); document.getElementsByTagName('head')[0].appendChild(scriptElem);
}