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.
What REALLY is Data Science? Told by a Data Scientist - By Joma Tech
Writing perfect code is a challenging process. That's where code reviews come in to help…
"The Next Leap: How A.I. will change the 3D industry - Andrew Price - Blender"
"Captain Disillusion: World's Greatest Blenderer - Live at the Blender Conference 2018 - CaptainDisillusion"
My 5 Favorite Linux Shell Tricks for SPEEEEEED (and efficiency) - By tutoriaLinux > What's…
View Comments
Nice article , you have indeed covered topic in details with sample code a, its indeed a topic which require a deeper understanding than many other JQuery topics.
Javin
How Garbage collection works in Java