equal
deleted
inserted
replaced
33 for (i = 0; i < this._callbacks[base_url].length; i++) { |
33 for (i = 0; i < this._callbacks[base_url].length; i++) { |
34 this._callbacks[base_url][i](this._cache[base_url]); |
34 this._callbacks[base_url][i](this._cache[base_url]); |
35 } |
35 } |
36 }; |
36 }; |
37 |
37 |
38 IriSP.jQuery.get(url, IriSP.wrap(this, func)); |
38 /* automagically choose between json and jsonp */ |
|
39 if (url.indexOf(document.location.hostname) === -1 && |
|
40 url[0] !== '/' /* not a relative url */ ) { |
|
41 // we contacting a foreign domain, use JSONP |
|
42 |
|
43 IriSP.jQuery.get(url, {}, IriSP.wrap(this, func), "jsonp"); |
|
44 } else { |
|
45 |
|
46 // otherwise, hey, whatever rows your boat |
|
47 IriSP.jQuery.get(url, IriSP.wrap(this, func)); |
|
48 } |
39 |
49 |
40 } else { |
50 } else { |
41 /* simply push the callback - it'll get called when the ressource |
51 /* simply push the callback - it'll get called when the ressource |
42 has been received */ |
52 has been received */ |
43 |
53 |