diTii.com Digital News Hub

Sign up with your email address to be the first to know about latest news and more.

I agree to have my personal information transfered to MailChimp (more information)


BJAX with Greasemonkey in Firefox and IE

You read about BJAX (Browser Extensions plus AJAX), the writter has 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.

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.


BJAX with Greasemonkey in Firefox and IE

Share This Story, Choose Your Platform!

Get Latest News

Subscribe to Digital News Hub

Get our daily newsletter about the latest news in the industry.
First Name
Last Name
Email address
Secure and Spam free...