User group CSS and JavaScript is possible sinceMediaWiki 1.18 (specificallyr82285).This means that CSS and JavaScript can be loaded peruser group.CSS and JavaScript pages take the following form, whereexample is the user group:
[[MediaWiki:Group-example.css]]
[[MediaWiki:Group-example.js]]
The special group*
does not loadMediaWiki:Group-*.js
orMediaWiki:Group-*.css
.To address all users, useMediaWiki:Common.js
andMediaWiki:Common.css
instead.Note that if$wgMFCustomSiteModules
is set (such as WMF production), you may also need to duplicate the styles inMediaWiki:Minerva.css
for it to effect mobile users.The special group "user" (for logged-in users) does loadMediaWiki:Group-user.js
andMediaWiki:Group-user.css
(though this was only introduced inMediaWiki 1.23,Gerrit #I0ef967).SeeUserModule.php for reference.
Examples: