Extension:Ajax

Ajax allows to run Ajax applets by visiting a special page which references a JavaScript page in the system message space. The applets are built on the fly through a kind of minimal preprocessor which adapts the JavaScript according to defined system messages.

Installation
As is standard with other MediaWiki extensions, you may install this extension by extracting the extension somewhere (usually the extensions folder), and adding require_once( '/path/to/AbuseFilter/AbuseFilter.php' ); to LocalSettings.php.

Usage
The special page is called as any other special page, but with an additional JavaScript-page from the MediaWiki-space. Typically a call would be  where the JavaScript is expected to be found on the page   and the title for the page should be on page. The suffix must be present, if not the special page will give an error message. Likewise the title page must be present.

The special page uses a very limited cpp-like language to augment JavaScript. It concists of the pragmas #DEFINE and #INCLUDE, and the control structures #IFDEF, #IFNDEF, #ELSE and #ENDIF. Each such pragma should be on a separate line.

Define
A system message kan be defined, that is, a special construct can import the system message for the interface language or the content language and bind it to a JavaScript variable. The process is initiated through using the pragma #DEFINE, optionally in combination with the keywords CONTENT or INTERFACE. Those keywords will limit the lookup of system messages to the defined languages. In addition a variable name must be specified and the name of a system message enclosed in angled brakets.

If a system message can't be resolved it will be left in the usual angled braket form.

Include

 * Examples