Adding and Deleting Scripts
To use user scripts, you create a personal JavaScript page, which only you and Wikipedia administrators can edit. On this page, you put the user scripts that you want to use, or pointers to other pages where JavaScript code is stored (which Wikipedia uses to add code to your page).
When you want to stop using a script, you edit that personal page, deleting the JavaScript code or pointer, or marking it as non-executable information. Thatâs called commenting it out, and it just means youâre telling the Wikipedia software not to follow those instructions.
Note
In late 2007, Wikipedia added a new feature that lets you implement user scripts with just a couple of clicks. On the My Preferences page, check the Gadgets tab to see if the script you want to add is listed on that tab. If so, you can save time by turning it on that tab, rather than following the instructions in this section. (For details, see Gadgets.)
Your Personal JavaScript Page
Creating your JavaScript page is as easy as creating a subpage in your own user space, as described in Chapter 3. See Personal Subpages if you need a refresher on subpages. This chapter assumes that youâre using the standard Monobook skin for your Wikipedia window (Skin), and so youâll name your personal page monobook.js. (If you use a different skin, see the box on Removing Scripts.)
When youâre ready to do the JavaScript jive, go to your user page, and follow these steps:
On your user page, click âedit this pageâ. ...
Get Wikipedia: The Missing Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.