Chickenfoot for Firefox: Rewrite the Web

User Interface Design Group

Quick Start Guide

Chickenfoot's user interface is a Firefox sidebar. Use View >> Sidebar >> Chickenfoot (or press F8) to make it appear.
  • Script Editor: Type Javascript or Chickenfoot code here and press Run to run it.
  • Output: View the result of the last script you ran. Use the output() command to display messages here from anywhere in your script.
  • Patterns: Enter keyword patterns here to see what they match on the web page.
  • Triggers: Install Chickenfoot scripts so that they run any time you visit a certain web page.

Try this simple script to see Chickenfoot in action:

go("google.com")
enter("uist 2005")
click("google search")
Here is a quick guide to the major Chickenfoot commands:

Page Navigation

Visit a url
go("google")    
Load url in a hidden window
w = fetch("yahoo")
Opens url in a new tab
openTab("www.mit.edu")

Forms & Links

Click on a button or link
click("feeling lucky")
click("FAQ")
Enter a value into a textbox
enter("chickenfoot")
enter("from address", "77 mass ave")
Check or uncheck a checkbox
check("arabic")
uncheck("arabic")
Pick from a listbox or drop-down
pick("GIF")
pick("file format", "any")

Pattern Matching

Find a pattern
m = find("google search button")
Count matches
m.count
Get visible text
m.text
Get HTML source
m.html
Get Node object
m.element
Iterate over matches
for (m = find(pattern);
     m.hasMatch;
     m = m.next) { 
  ... 
} 

Page Modification

Insert html into page
insert(before("textbox"), "Search: ")
insert(after("textbox"), "...")
Remove html from page
remove("advanced search link")
Replace html
replace("first image", 
        "<img src='mylogo.jpg'>")

Widgets and Interaction

Make a link or button that fires action when clicked
new Link("Go to Google", 
         "go('google')")
new Button("Green", function() { 
  document.body.style.background = "green"
} )


©2004-2008 Massachusetts Institute of Technology