|
This is intended to be a guide to Grease Monkey. This guide will cover installation of Grease Monkey, basic use and how it can be applied to BvS, and a couple of tips for making your own BvS Grease Monkey scripts. This is not a primer on Javascript or programming in general.
Update: Moved some stuff around and added a 'Installing a script from Source Code' section.
----- Beginning Guide -----
[[toc]]
+ Grease Monkey FAQ
++ What is Grease Monkey?
Grease Monkey is a Mozilla Firefox add-on that allows you to customize webpages with small scripts written in Javascript. They can be as simple as changing the background color or image, to totally rewriting the page in a format you prefer.
++ Can I still use Grease Monkey if I don't use Firefox?
Tentatively yes. There are addons for the other major browsers (Internet Explorer, Safari, Opera, etc.). They are not made by the same people and may interpret a script differently from each other.
++ What can't Grease Monkey do?
If it can't be done in Javascript (for example, automatically printing a webpage) then it can't be done with Grease Monkey.
+ Where do I find Grease Monkey scripts to install?
Many, but not all, of the scripts written for BvS can be found at [http://userscripts.org/scripts/search?q=BvS&x=0... Userscripts.org]. A more complete list can be found in the first post of the [http://www.animecubed.com/billy/forum/viewtopic... Grease Monkey Thread] in the official [http://www.animecubed.com/billy/forum Billy vs. SNAKEMAN Forum].
++ Does this have anything to do with the [[[team:greassmonkeys]]] team?
No.
+ Installation
++ Installing Grease Monkey:
First go to Tools -> Add-ons. Then in the new Dialog box that just opened, click on the Get Add-ons tab. Next, do a search for "Grease Monkey". After search is done, click on the __A__dd to Firefox button. Finally, after Grease Monkey is installed, restart your browser.
++ Installing a Grease Monkey script from a link:
Follow the link and click on the install script button in the dialog box that opens up. This is the simplest way to install a script.
++ Installing a Grease Monkey script from source code:
Go to Tools -> Greasemonkey -> New User Script. In the New user Script dialog box give the script a name and replace whatever is in the 'Includes (One per line) box with:
> *animecubed.com/billy/forum/billy/bvs/PAGENAME
replacing PAGENAME with the file name of the page you want the script to affect (or a * if it is meant to affect all of BvS) and then hit OK. Your text editor of choice should open up with a few lines of code in it. Beneath the lines of code, paste the source code and save the script. Finally reload the page the script is suppose to affect by hitting the appropriate link in the BvS minimenu.
+ Things to keep in mind when writing your own Grease Monkey script:
* There are two domains that can be used to play BvS, http://www.animecubed.com and http://animecubed.com. Keep in mind that someone using your script could be using either URL, so when defining which pages your script will affect, it is best to use http://*animecubed.com instead of one or even both of the previous URL domains.
* Also keep in mind that the domain the end user is playing from affects the absolute URL of any files you are reading (for example, image files). Be sure to keep that in mind when you code.
* McMasters has requested that Grease Monkey script writers not do two things with their scripts:
* Do not autoload large numbers of pages (no writing a script to autoload the player look-ups of all your villagers, for example).
* Do not mess with the CAPCHA.
* If you do not have a webpage, and aren't interested in starting one, you can create an account on [http://userscripts.org Userscripts.org] and host your scripts there. Alternatively, you can simply post your source code on the official BvS forum.
----- Ending Guide -----
Any corrections or additions are welcome.
|