Skip to content
Dario Giovannetti edited this page Jan 4, 2022 · 24 revisions

The standalone version of Wiki Monkey is run as a simple user script initially downloaded from an external server. Compared to the Server/Client version it has limited functionality but does not require a database server.

Installation

Installing Wiki Monkey is as simple as adding one of the following lines to your User:Example/common.js page:

For ArchWiki:

mw.loader.load('https://rawcdn.githack.com/kynikos/wiki-monkey/v5.5.3/dist/WikiMonkey-ArchWiki.min.js');

For Wikipedia:

mw.loader.load('https://rawcdn.githack.com/kynikos/wiki-monkey/v5.5.3/dist/WikiMonkey-Wikipedia.min.js');

Refresh any wiki page and Wiki Monkey will start working with the default configuration.

The example scripts above use githack.com, but you can use rawgit.com as an equivalent alternative, for example:

mw.loader.load('https://cdn.rawgit.com/kynikos/wiki-monkey/v5.5.3/dist/WikiMonkey-ArchWiki.min.js');

The *.min.js scripts are minified versions recommended for most users. If you want to install the "human-readable" bundle, perhaps for debugging purposes, just remove .min from the script's extension, for example:

mw.loader.load('https://cdn.rawgit.com/kynikos/wiki-monkey/v5.5.3/dist/WikiMonkey-ArchWiki.js');

In case you were wondering, mw.loader.load() properly makes use of the browser's cache, it will not download the script at every page request.

See Manual:Interface/JavaScript for more information on MediaWiki user scripts.

Caveats:

  • Do specify the version number in the script's URL; CDNs rely on long-term caching and using a more generic reference such as master as an attempt to automate updates will not work; Wiki Monkey has an update notification and installation system, see the Updates section below for more information.
  • Do not try to download the script from raw.githubusercontent.com, since it purposely serves Javascript files with a text/plain header and most modern browsers will not execute them. See http://stackoverflow.com/questions/7180099/including-js-from-raw-github-com for more details.

Updates

As noted in the Installation section, the Wiki Monkey script must be referenced with a specific version. Nonetheless, the application will periodically and automatically check for an updated version, by default once a week, on Saturday, or the first time that you access a wiki page 7 days after the previous update check.

If an updated version is detected, Wiki Monkey will notify and prompt you to trigger an automated upgrade edit, which simply checks for the mw.loader.load() line in your User:Example/common.js page and changes the version number to the latest release.