MediaWiki:Gadget-ImageAnnotator.js: Difference between revisions

Content deleted Content added
Use protocol-relative URLs
Adapt for protocol-relative uris
Line 1,947:
+ '&prop=info|imageinfo&inprop=protection&iiprop=size'
+ '&titles=&callback=ImageAnnotator.info_callbacks[].callback';
if (template.startsWith('//')) template = document.___location.protocol + template; // Avoid protocol-relative URIs (IE7 bug)
make_calls (
function (length, titles) {
Line 2,703 ⟶ 2,704:
+ '&maxage=1800&smaxage=1800&uselang=' + wgUserLanguage //see bugzilla 22764
+ '&callback=ImageAnnotator.script_callbacks[].callback';
if (template.startsWith('//')) template = document.___location.protocol + template; // Avoid protocol-relative URIs (IE7 bug)
make_calls (
list
Line 3,133 ⟶ 3,135:
url += ((url.indexOf ('?') >= 0) ? '&' : '?') + 'dummyTimestamp=' + (new Date()).getTime ();
}
// Avoid protocol-relative URIs (IE7 bug)
if (/^\/\//.test (url)) url = document.___location.protocol + url;
if (bypass_local_cache) {
var s = document.createElement ('script');