User blog:Lil' Miss Rarity/Tutorials - JavaScript Enhancements



Hello there! I am Lil' Miss Rarity and I am here today to talk about some of the amazing things some fellow Wikians have created in order to enhance your user experience either across the network or on individual wikis. The main topic I wish to focus on is JavaScript enhancements which, thanks to the technically skilled users at Developers Wiki, are easier than ever to install.

JavaScript
JavaScript is a prototype based web scripting language that allows developers to add dynamic content to web pages.

Wikia offers the use of many JavaScript pages, most notably MediaWiki:Wikia.js and MediaWiki:Common.js. Through these pages users are able to easily install custom JavaScript enhancements on their wikis for use by other users. Most notably AjaxRC which allows for easier patrolling of the Recent Changes/Wiki Activity.

Installation
In order to install these scripts it is necessary to know a little bit of JavaScript (which will be taught).

In order to include a script on your wiki you must add the following code to your JavaScript page of choice.

This will import the AjaxRC extension for your wiki. But what if you want to use multiple scripts? Then you just add another import statement below the AjaxRC one separated by a comma like so.

You can do this for however many scripts you like.

Now we come to another question...

What if I want to include the configurations options from the script?

This is a fairly easy thing to answer, just add them above the import articles call in the JavaScript page.

NOTE: Always add configuration options above the import call in order for them to load properly.

That's a wrap! I hope you all enjoyed this as well as learned a thing or two about how to enhance the experience of your wikis users.