Railgun Wiki
Register
Advertisement
General information Installation instructions Configuration options Changelog
Railgun Wiki Installation Configuration Changelog
List of all code pages Create a module tutorial Railgun's API Author of the script
Code Developing a module API User:Mathmagician

Config options[]

When installing Railgun, there are certain configuration options you can use. To do this, simply create a RailgunConfig object before importing the script.
  1. isDebug {Boolean} [ default: false ] -- When set to true, non-cached versions of all code pages (other than the client) will be used, and extra information will be printed to the console for debugging purposes.
  2. isDelay {Boolean} [ default: false ] -- When set to true, the Railgun framework and API will load, but the script will halt just before execution. This is useful when developing a module, as you can register a new module from the console and then manually call Railgun.init() (see API) to test the module.
  3. modulesJS {String} [ default: MediaWiki:RailgunModules.min.js ] -- used to specify a custom modules package to load with Railgun.
  4. modulesCSS {String} [ default: MediaWiki:RailgunModules.min.css ] -- used to specify a custom modules stylesheet to load with Railgun.

Sample usage[]

To use configuration options, you'd place something like this your w:Special:MyPage/global.js.

/* Railgun client for the siderail by User:Mathmagician */
/* http://railgunscript.wikia.com/wiki/Railgun_Wiki */

// Configuration, see http://railgunscript.wikia.com/wiki/Configuration
RailgunConfig = {
    isDebug: true,
    isDelay: true,
    modulesJS: "http://railgunscript.wikia.com/wiki/MediaWiki:RailgunModules.js&action=raw&ctype=text/javascript&maxage=0&smaxage=0",
    modulesCSS: "http://railgunscript.wikia.com/wiki/MediaWiki:RailgunModules.css&action=raw&ctype=text/css&maxage=0&smaxage=0"
};

importScriptPage('MediaWiki:RailgunClient.js', 'railgunscript');

Alternative installation[]

If you'd like to have a non-cached version of the client, please use the following import statement instead of the default one.

/* Railgun client for the siderail by User:Mathmagician */
/* http://railgunscript.wikia.com/wiki/Railgun_Wiki */
importScriptURI('http://railgunscript.wikia.com/wiki/MediaWiki:RailgunClient.min.js?action=raw&ctype=text/javascript&maxage=0&smaxage=0');
Advertisement