Open main menu

Wikibooks β

MediaWiki Developer's Handbook/Add JavaScript

< MediaWiki Developer's Handbook

Sometimes features are best coded as client-side JavaScript (js) instead of in the software (either as core, or an extension). This chapter is a guide to developing js solutions. Instead of the bottom-up method of instruction used in JavaScript, this text will use top-down methods, beginning with the examination of methods used in several useful scripts, examining the particular techniques used, and then extending them to another set of useful scripts.

This chapter will teach you only the basics of scripting in a MediaWiki environment; for generic or complex scripting, or use outside MediaWiki, refer to JavaScript.