Activate your free membership today | Log-in

Tuesday, August 1st, 2006

BJAX with Greasemonkey in Firefox and IE

Category: Examples, Firefox, IE

On the heels of my post about BJAX (Browser Extensions plus AJAX), I received a flood of requests asking for an example of how to build such an extension. In response, I’ve put together a Greasemonkey script that demonstrates how to add a simple Ajax widget to a third party web page. The example isn’t particularly useful — a translucent box that floats over the google search page and displays the current weather, updated every minute, in downtown Chicago — but it does illustrate the basics of using GM_xmlhttpRequest as well as the pitfalls of writing Javascript that executes in the Greasemonkey sandbox. An article discussing an updated version that adds support for IE (using the Turnabout extension) and the ability to toggle the size of the widget can be found here.

www.google.com_search.png

If you want to do any serious development in this environment, of course, you’ll want to port an Ajax framework across to use GM_xmlhttpRequest instead of XMLHttpRequest, and obey the other restrictions of the Greasemonkey sandbox.

Posted by Dietrich Kappe at 9:07 am
4 Comments

++++-
4.2 rating from 19 votes

4 Comments »

Comments feed TrackBack URI

Chickenfoot looks like an interesteing alternative to Greasemonkey.

Comment by Benji York — August 1, 2006

Hijacking Google with a Dilbert browser felt more, uhm, useful. ;-)

Comment by Johan Sundström — August 1, 2006

If anyone gets Chickenfoot to work, I’m very interested.

Comment by Jeremy Dunck — August 1, 2006

Pass4sure enjoys a wide rang of reputation among the IT learners and candidates by offering variety of product forms, as software, hardcopy, video, E-Zine, etc. In order to show their appreciation of the contribution made by customers constantly, some promotions are adopted, as discounts and Points for gift. Recently, Pass4sure is promoting an Affiliate Program to enlarge its business. The Most Popular exams List :220-702EC0-350 350-029 EC0-350 642-812 640-460 642-145 642-975 SY0-101 642-691 1Y0-259 350-001-LAB640-460 640-816 JN0-532 650-621 642-812 1Z0-042 156-315.65 CISSP 642-359 650-180 640-802 Click Pass For Sure to get more information!

Comment by pass4sure — February 24, 2010

Leave a comment

You must be logged in to post a comment.