User:Topaz/Wikiscripts/Installation
Installing or updating my wikiscripts is a reasonably straightforward process. Here are the steps you'll need to follow to install them for your own Wikipedia account.
Figuring out dependencies
[edit]My scripts are broken up into small, reusable pieces. In order to use my scripts, you'll need to figure out exactly which of these pieces you're going to need. In order to do this, find your desired script on my wikiscript list and copy down its name and the names of each library (the blue ones) higher than it in the tree. For example, suppose you see this:
- A
- B
- C
- D
- E
- F
- G
- B
If you'd like to install G, you need to remember that its dependencies are A and E. Keep the dependencies in the order they have in the dependency tree. If you also want D, your final list would be this: A, B, D, E, G. Remember this list for later.
monobook.js
[edit]The first thing you'll need to modify is a subpage of your own userpage named monobook.js
. This page contains JavaScript code and is responsible for running any other scripts. My monobook.js
, for example, is located at User:Topaz/monobook.js. Open your monobook.js
for editing now.
Adding includes
[edit]You might already have some code in your monobook.js
- this is fine and will only cause problems in rare cases. If you don't already have an include section for my wikiscripts in your monobook.js
, just start one at the bottom. If you do already have one, just make the necessary changes.
After you've done that, you need to include the files from your dependency list. For each script, add a line like the following:
importScript("User:Topaz/init.js");
Use the full page path within the quotes, not the title. For libraries, keep the user Topaz. For modules, change the user to your own username. So, if your username is Jimbo, one of your includes might look like this:
importScript("User:Jimbo/statuschanger.js");
When you're all done, the new section in your new monobook.js
might look something like this:
importScript("User:Topaz/init.js"); importScript("User:Topaz/util.js"); importScript("User:Jimbo/editcountutil.js"); importScript("User:Topaz/comm.js"); importScript("User:Topaz/wputil.js"); importScript("User:Jimbo/statuschanger.js");
Configuring modules
[edit]Now, you'll notice that each module you've included is supposed to come from subpages of your userpage that don't yet exist. For each of these, copy the source from the module as linked from the wikiscript list and create a new page with the appropriate name and that source. Since you have your own copy, you can personalize how the scripts act.
Any script which is meant to be personalized has a clearly defined configuration section near the top of the file which starts with /* configuration */
and ends with /* end configuration */
. Follow the instructions provided within the configuration section of each script and change the settings to suit your tastes.
Clearing your browser cache
[edit]Once you've set everything up, you'll need to clear your browser's cache so the changes take effect. To do this, follow the instructions at the top of any JavaScript page:
- After saving, you have to bypass your browser's cache to see the changes. Mozilla/Safari: hold down Shift while clicking Reload (or press Ctrl-Shift-R), IE: press Ctrl-F5, Opera/Konqueror: press F5.
As soon as the page reloads, you should see your shiny new scripts in action!
Getting help
[edit]If something doesn't seem to be working quite right, the first thing you should do is reread the directions to make sure you didn't accidentally skip something. If you're still stuck, feel free to bug me on my talk page. Be precise in the description of your problem: explain exactly what is happening (or isn't happening) and provide exact error messages if you're getting any. Also include what browser you're using.