Categories: Frontend Tech

Chickenfoot mixed with jQuery.

Chickenfoot is a Firefox extension design for website automation.

Chickenfoot is a 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.

Basically, it let’s you take control of Firefox and simulate a user. The API is fill with basic operation, like go(url), append(content), onClick( function, window) and etc. You can get more power and functionality by including other JavaScript libraries and frameworks. That’s when the fun begins.

Since the goal in website automation is a lot of HTML manipulations then, jQuery is the best framework for the job. jQuery can be easily included with a simple fix here.
Here are some examples of Chickenfoot scripts. Once Chickenfoot is installed hit f8, press the “New” tab, then insert one of the following scripts.

Downloading a URL

include( "fileio.js" ); //Enables the write and read commands.
var url = "http://google.com",
content = read( url ),
filename = desktopDir().path + "\\google.html";

write( filename, content );

Clean up craigslist.org

include( "http://bateru.com/js/jquery-1.4.2-mod.js" );
$ = window.$;
var url = "http://houston.craigslist.org/sss/";
go( url, true ); //Refresh the page to the url
sleep(2); // So you can see the different.
var cleanHTML = $(document.body).html().toLowerCase();
cleanHTML = cleanHTML.replace( /[$\*!]{2}|[~\*]/gi, "");
$( document.body ).html( cleanHTML );

Overall, Chickenfoot is a great extension to have. These few examples shown here only scratch the surface of what it’s capable of.

Chickenfoot 1.0.7 link
jQuery link

Larry Battle

I love to program, and discover new tech. Check out my stackoverflow and github accounts.

View Comments

Share
Published by
Larry Battle

Recent Posts

What really is Data Science? Told by a Data Scientist

What REALLY is Data Science? Told by a Data Scientist - By Joma Tech

7 years ago

Video: How Water Towers Work

How Water Towers Work - Practical Engineering

7 years ago

Dev Tip: Simple tips to improve code reviews

Writing perfect code is a challenging process. That's where code reviews come in to help…

7 years ago

Video: How AI will change the 3d industry

"The Next Leap: How A.I. will change the 3D industry - Andrew Price - Blender"

7 years ago

Best Software Presentation for 2018

"Captain Disillusion: World's Greatest Blenderer - Live at the Blender Conference 2018 - CaptainDisillusion"

7 years ago

Dev Video: A Few Linux Shell Tips

My 5 Favorite Linux Shell Tricks for SPEEEEEED (and efficiency) - By tutoriaLinux > What's…

7 years ago