Extension:GlobalCssJs

Usage
This extension allows loading of global css and js from a central wiki (good for use on wiki farms). Both overall CSS/JS can be added (via MediaWiki:Global.css and MediaWiki:Global.js on the central wiki), as well as user CSS/JS. In order for the global site CSS/JS to work, the local site CSS/JS must be enabled for each respective function to work. In order for the global user CSS/JS to work, the user must have the same username on the local wiki and the central wiki, they must have enabled the "Enable Global User CSS/JS" in their Special:Preferences, and the user CSS and/or JS must be enabled on the local wiki for each respective function to work as well.

You can set the preference for user css/js to be automatically enabled, but it is not recommended to do so on wikis without a shared user database, as it opens up a potential XSS vector, which allows other users to hijack the user's account, among other things.

Currently, the global CSS and JS is loaded after the local CSS and JS, so it overrides all the other styles. This should hopefully be fixed sometime soon.

This extension currently does not use ResourceLoader. 94837 is currently pending review.

$wgGlobalCssJsUrl
Default value: null

This is the URL (including the https://) to the wiki where you are loading the global css/js from. The url must be the path to that wiki's index.php.

If you do not set this, the extension will not run.