Saturday, September 17, 2005

Googlize This !

I recently discovered greasemonkey, a firefox extension which enables to launch user scripts after a web page is loaded. Having a look at the existing scripts, I remember an old script idea I had some time ago: Googlize this!

When I am writing posts, I often add links to illustrate my ideas, the firefox and greasemonkey links in this post for example. To do that I just do q quick google search, and often copy the first answer as a link.

Thus I wanted a script which would run onload and replace significant words (ie long words) with a google lucky link.
At that time I didn't know about XML DOM javascript functions, which enable to edit the HTML structure of the document, rewriting it all. I discovered that exploring greasemonkey, and wrote two scripts :

The first script is a grease monkey user script, when installed on your firefox (along with greasemonkey) it will Googlize any loaded page - you can include/exclude pages.

To install the greasemonkey script, first install greasemonkey, then right click here and choose "Install User Script..."

The second script is a simple javascript you can include in a page, and activate with a button : try it (working, but quite slow). Get it.

Of course you could change the URL from google's to anything like wikipedia or google define.

All this was tested with firefox only.


Update : The greasemonkey script is now listed on greasemonkey, rate and comment !

1 comment:

Anonymous said...

good site.
can you help me?
there is a script that simulates push button Back of IE?
i have write a script with function "history.back()" but i'm not able and not work can you help me please?

Thanks in advance...