MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

// Import scripts for all users importArticles({   type: "script",    articles: [        "w:c:dev:InputUsername/code.js"    ] });

// Import user group scripts var ug = mw.config.get("wgUserGroups").join, group;

if     (/sysop/.test(ug))             group = "sysop"; else if (/content-moderator/.test(ug)) group = "content-moderator"; else if (/autoconfirmed/.test(ug))    group = "autoconfirmed";

if (group) importArticles("MediaWiki:Group-" + group + ".js");