Chickenfoot 0.9.20060607 released
A new version of Chickenfoot is out, with several major improvements and bug fixes.
Every Chickenfoot script and trigger now runs in a fresh, private namespace. Formerly, all Chickenfoot scripts shared the same namespace, so it was easy to share global variables between scripts, but scripts could step on each other inadvertently. Most scripts won’t notice this change at all. But if you use global variables to pass information between two scripts, or to store information between subsequent runs of the same script, you’ll have to change your script’s behavior. A new Chickenfoot object, global, provides a place for keeping these global variables. Just prefix the global variables you want to share with global, e.g. global.myVariable, and every script will be able to see them.
The script editor now has multiple tabs, so you can edit multiple scripts at the same time, and use scratch editors for testing and experimentation. The script editor also now has keyboard shortcuts for its toolbar buttons: Ctrl-N for new file, Ctrl-O to open a file, Ctrl-S for save, Ctrl-W for close file. These shortcuts override Firefox’s meaning for these keys only if the focus is in the script editor.
Regular expression support. find() can take a regular expression, which it searches for in the text of the page, e.g. find(/ISBN: \d+/). Parenthesized groups in the regular expression are placed on the Match object as an array called groups.
Image searching. find() can now search for images, e.g. find(”Google image”). Keywords are taken from the image’s ALT text and from text around it in the page.
Other changes:
- Chickenfoot triggers can now be disabled using a Firefox preference, so that you can deal with a misbehaving trigger that cripples Firefox. The Chickenfoot FAQ explains how.
- Pattern matching now uses context properly, so you can say find(”search form”).click(”button”).
- Patterns now look for keywords in ALT attributes of image buttons.