Tuesday, August 1st, 2006
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
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