Wednesday, July 25, 2007

Chicken Foot


No!, it is not a delicious delicacy as part of chicken. This is a Firefox extension. Chickenfoot is Firefox extension that puts a programming environment in the browser's sidebar so you can write scripts to manipulate web pages and automate web browsing. In Chickenfoot, scripts are written in a superset of Javascript that includes special functions specific to web tasks.

This is too useful for people who want to execute something on a page. It's more or less like the popular greasemonkey extension but it has a different flavor as it differs in the way you can execute a piece of code as you are coding on a given page. It has libraries you can import and get a functionality flawlessly.

I am giving an example of a script which I use to bypass the firewall that blocks sites (false +ve in too many cases) on my LAN. I just have to run that trigger on the page and the links on that page go via a proxy that is thankfully not blocked .

Here's the code:

include('prototype.js');
var links = $$('a');
for(var
i=0;i<links.length;i++) {
var src = links[i].href;
src =
src.replace("http://","http/");
links[i].setAttribute("href", "http://www.xoxy.com/cgiproxy/nph-proxy.pl/010110A/"
+ src);
}


Let me know, if someone needs to know how to configure this in their chickenfoot editor.


Powered by ScribeFire.

No comments yet