Chapter 21. Easier Editing with JavaScript

You can customize Wikipedia in ways that make your editing easier with user scripts, which are written in JavaScript code. As you’ve seen in Power Users’ Clinic boxes in this book, user scripts let you do things like color code your User contributions page, or remove pages from your watchlist by just clicking a box on your watchlist report, or adding additional links on the left side of the screen. As you explore Wikipedia, you’ll find many more user scripts that editors have created to make editing work easier.

Here’s how it works: When the Wikipedia server builds a page to send to your browser, it includes any JavaScript code stored in your personal JavaScript page at Wikipedia. Your browser follows the JavaScript instructions when it shows you the page, controlling how the Wikipedia page looks and works.

Best of all, you don’t have to understand JavaScript to use it. You just need to know the process for cutting and pasting chunks of code to your personal JavaScript file. This chapter shows you how.

Setting Up Your Browser

User scripts don’t work if JavaScript isn’t turned on. JavaScript is automatically turned on in most every Web browser, so you don’t have to change the standard settings. If user scripts aren’t working for you (you’re just seeing the regular Wikipedia screen after you implement some JavaScript), this section shows you how to check your settings.

How you check the settings depends on your browser:

  • Internet Explorer. The setting is called “Active scripting”. Go to Tools→Internet Options→Security tab. Select Internet for the zone, and then click the Custom level button. Scroll down to the Scripting section, and then, in the Active scripting subsection, make sure that Enable is already selected. If not, click to turn it on, and then click the Okay button. When the Change settings dialog box appears, click Yes. (In Internet Explorer 6, this dialog box is labeled Warning.)

  • Firefox. In Windows, go to Tools→Options; on a Mac, go to Firefox→Preferences. At the top of the Options box, click Content (if it’s not already highlighted), and make sure the “Enable JavaScript” checkbox is turned on. If not, click to turn it on, and then click OK.

    Tip

    If you have security concerns about globally turning on JavaScript for all Web sites, the Firefox add-on NoScript lets you turn on JavaScript on a site-by-site basis.

  • Opera. Go to Tools→Preferences→Advanced tab. On the left, select Content, and make sure the Enable JavaScript checkbox is turned on. If not, turn it on, and then click OK.

  • Safari. Go to Safari Preferences→Security, and, under Web Content, make sure the Enable JavaScript checkbox is turned on. Close the Preferences window when you’re done.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.31.50