Sunday, December 11, 2005

Tech: Mozilla - Greasemonkey

Well I think it might be interesting to journal some of the geek stuff I learn so here is the first of what is probably may be many tech entries.

Today I learned about client side scripting of web pages. Mozilla has this very nice little XPI extension called Greasemonkey though someone was nice enough to create it's equivalent Trixie for Internet Explorer. What it does is basically inject Javascript code into HTML documents. Such an injected script is capable of completely rewriting a web page though in all practicality it's most useful in tweaking web pages and their behaviors. This script for example automatically logs you into Myspace which is useful as I'm the only one that uses my computer and after all it's only myspace. One thing bugs me about Myspace is all the music and videos that automatically play when you load someones Myspace page; I am going to write a script that turns all the various players off by default as well as add an external link you can right click on to save all the cool videos and music to disk. Also Yahoo include an HTML flag on it's login pages that Mozilla honors such that it won't store your password in password manager; this script will remove that flag and henceforth no more typing a password to read my yahoo mail!

Something else interesting that I learned is that all the cool XPI extensions for Mozilla and Firefox are just ZIP files with installation and meta data such as author names, but the code itself is Javascript just like Greasemonkey! Scripts can be converted to XPI Mozilla extension when they become complicated and need extra functionality in modifying browser behavior such as creating their own configuration menus.

So you tell me, what web pages do you visit and what is it about them that bothers you that you wish you could change?

No comments: