Conquer Club

Learn Greasemonkey

Archival storage to keep things organized and uncluttered. Can't find what you need? Search for old topics here.

Moderator: Tech Team

Forum rules
Please read the Community Guidelines before posting.

Learn Greasemonkey

Postby a.sub on Thu May 21, 2009 2:07 am

Hey i want to pick up programming in greasemonkey but chip's link doesnt work for me :?
User avatar
Cadet a.sub
 
Posts: 1834
Joined: Thu Jun 14, 2007 2:07 am
Medals: 26
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (1) Quadruples Achievement (1) Terminator Achievement (1)
Assassin Achievement (2) Manual Troops Achievement (1) Freestyle Achievement (2) Fog of War Achievement (1) Speed Achievement (2)
Cross-Map Achievement (1) Ratings Achievement (3) General Achievement (1) Tournament Contribution (6)

Re: Learn Greasemonkey

Postby yeti_c on Fri Apr 30, 2010 3:39 pm

Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am
Medals: 48
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (3) Terminator Achievement (1)
Assassin Achievement (1) Freestyle Achievement (1) Fog of War Achievement (3) Teammate Achievement (2) Cross-Map Achievement (3)
Ratings Achievement (3) General Achievement (1) Map Contribution (13) Tournament Contribution (1) General Contribution (10)

Re: Learn Greasemonkey

Postby a.sub on Fri Apr 30, 2010 6:13 pm

much obliged! :)
User avatar
Cadet a.sub
 
Posts: 1834
Joined: Thu Jun 14, 2007 2:07 am
Medals: 26
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (1) Quadruples Achievement (1) Terminator Achievement (1)
Assassin Achievement (2) Manual Troops Achievement (1) Freestyle Achievement (2) Fog of War Achievement (1) Speed Achievement (2)
Cross-Map Achievement (1) Ratings Achievement (3) General Achievement (1) Tournament Contribution (6)

Re: Learn Greasemonkey

Postby yeti_c on Sun May 02, 2010 12:52 pm

No worries.

Feel free to post any queries you have - or any other good learning sites in this thread.

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am
Medals: 48
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (3) Terminator Achievement (1)
Assassin Achievement (1) Freestyle Achievement (1) Fog of War Achievement (3) Teammate Achievement (2) Cross-Map Achievement (3)
Ratings Achievement (3) General Achievement (1) Map Contribution (13) Tournament Contribution (1) General Contribution (10)

Re: Learn Greasemonkey

Postby Dako on Thu May 06, 2010 12:50 pm

Very good book about Greasemonkey
http://diveintogreasemonkey.org/

It is available online or as PDF or HTML download.
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia
Medals: 138
Conquer Cup Bronze Achievement (1) Standard Achievement (3) Doubles Achievement (3) Triples Achievement (3) Quadruples Achievement (3)
Terminator Achievement (2) Assassin Achievement (2) Manual Troops Achievement (2) Freestyle Achievement (2) Polymorphic Achievement (1)
Nuclear Spoils Achievement (2) Fog of War Achievement (3) Trench Warfare Achievement (1) Speed Achievement (1) Teammate Achievement (2)
Random Map Achievement (2) Cross-Map Achievement (3) Battle Royale Achievement (1) Ratings Achievement (3) Tournament Achievement (17)
General Achievement (24) Clan Achievement (34) Tribe Achievement (2) General Contribution (21)

Re: Learn Greasemonkey

Postby sherkaner on Thu May 06, 2010 2:26 pm

I just looked through the book, and it's a bit outdated (as it says on the page you're linking to).

Some updated basics:
- A greasemonkey script is mainly an extra javascript-file that is executed on the page with a few extra limitations and possibilities.
There are enough resources available on javascript, so I won't dive into that (though Douglas Crockford's lectures are a good place to start if you already know how to write programs).
- Extra possibilities include saving information (though this can be done through localStorage these days) and doing cross-site URL requests.

- Small bits of code (for finding a certain element or doing some basic operations) are best to check through the firebug console.
- Best way to debug: actually install the script in chrome, and use the Chrome debugger to set breakpoints and check certain objects.
- second-best way: Install/use firebug in firefox, and use its logger through unsafeWindow.console.log(element). This will show the element/object in the firebug console, which can be used to inspect further.
Unfortunately the debugger in Firebug doesn't work for greasemonkey scripts at the moment.

- The main difference between firefox and chrome scripts: Chrome doesn't allow the script to interfere with scripts on the page in any way.
Greasemonkey does (mainly through unsafewindow), but that is thought to be a bad practice. Chrome also doesn't allow cross-site URL requests, though there are ways around that.
Colonel sherkaner
 
Posts: 1595
Joined: Thu May 03, 2007 3:21 am
Location: Zwolle
Medals: 42
Standard Achievement (3) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (2) Terminator Achievement (2)
Freestyle Achievement (2) Nuclear Spoils Achievement (1) Fog of War Achievement (2) Speed Achievement (1) Teammate Achievement (2)
Random Map Achievement (1) Cross-Map Achievement (3) Ratings Achievement (2) Tournament Achievement (3) Clan Achievement (3)
General Contribution (11)

Re: Learn Greasemonkey

Postby a.sub on Fri May 07, 2010 1:29 am

ill make sure to look into all of this once AP testing is over :D
User avatar
Cadet a.sub
 
Posts: 1834
Joined: Thu Jun 14, 2007 2:07 am
Medals: 26
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (1) Quadruples Achievement (1) Terminator Achievement (1)
Assassin Achievement (2) Manual Troops Achievement (1) Freestyle Achievement (2) Fog of War Achievement (1) Speed Achievement (2)
Cross-Map Achievement (1) Ratings Achievement (3) General Achievement (1) Tournament Contribution (6)


Return to Tool Archives

Who is online

Users browsing this forum: No registered users