User:Zemoxian/common.js

// This is a test function link(href, label) { document.writeln(""+label+""); } function show(prefix, variable, postfix) { document.writeln(""+prefix+ mw.config.get(variable) +postfix+""); }

document.writeln(""); link("http://www.mediawiki.org/wiki/Manual:Interface/Common.js", "Common.js"); link("http://en.wikipedia.org/wiki/Special:MyPage/common.js", "My common.js"); link("http://www.mediawiki.org/wiki/Manual:Interface/JavaScript#mw.config", "mw.config"); show("skin: ", "skin", ""); show("title: ", "wgTitle", ""); show("page: ", "wgPageName", ""); show("action: ", "wgAction", ""); show("user: ", "wgUserName", ""); show("groups: ", "wgUserGroups", ""); document.writeln("This "+ (mw.config.get('wgIsArticle') ? "is" : "is not") +" an article"); document.writeln("");