Using JQuery under chrome

Using JQuery under chrome


I tried to use the cluetip demo from a Firefox extension directory.
Everything worked fine except from opening other local files used in
the demo.
http://plugins.jquery.com/project/cluetip
The reason it was failing was that the status in xmlhttprequest was
set to 0. I compared the relevant code in Dojo and Jquery and found
that the missing bit was: location.protocol=="chrome:". The demo
works fine with that inserted into jquery (see below).
The dojo file hostenv_browser.js line 113-117 had the following code -
return ( (stat>=200)&&(stat<300))|| // Boolean
(stat==304)|| // allow any
2XX response code
(stat==1223)|| // get it out
of the cache
(!stat && (location.protocol=="file:" ||
location.protocol=="chrome:") ); // Internet Explorer mangled the
status code
I modified jquery.js (line 4514...) with the important bit -
            return !r.status && (location.protocol == "file:" ||
location.protocol=="chrome:")||
                ( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
(stat==1223)||
                jQuery.browser.safari && r.status == undefined;
(I only included (stat==1223) in case I got a chance to test it)