Confirmed users
161
edits
m (fix the heading level) |
(→ScriptMod constructor: Make 'include' required [7:ff25bb83ffdb in my repo]) |
||
Line 59: | Line 59: | ||
==== <code>ScriptMod</code> constructor ==== | ==== <code>ScriptMod</code> constructor ==== | ||
The <code>ScriptMod</code> constructor takes a single <code>options</code> parameter which is an object that may define the following properties: | The <code>ScriptMod</code> constructor takes a single <code>options</code> parameter which is an object that may define the following properties: | ||
* <code>include</code>: | * <code>include</code>: a required parameter specifying the pages the scripts in this script mod should run on. | ||
** Providing a string value <code>str</code> is equivalent to providing a single-item array <code>[str]</code>. | ** Providing a string value <code>str</code> is equivalent to providing a single-item array <code>[str]</code>. | ||
** The mod's scripts run on pages, matching ''any'' of <code>include</code> rules. | ** The mod's scripts run on pages, matching ''any'' of <code>include</code> rules. |