MediaWiki:Gadget-ImageAnnotator.js: Difference between revisions
Content deleted Content added
Fix https warnings |
m Avoid jquery dependency for this; Some non-WMF wikis also run this, and may not have jquery. Also replace the protocol with the one of the current document instead of removing it to avoid spurious problems possible on IE7. |
||
Line 1,001:
this.icon = ImageAnnotator.UI.get ('wpImageAnnotatorIndicatorIcon', false);
if (this.icon) this.icon = this.icon.firstChild; // Skip the message container span or div
var srcFixed = img.attr('src').replace(/^http[s]?\:/, '');▼
img.attr('src', srcFixed);▼
// Guard against misconfigurations
if ( this.icon
Line 1,010 ⟶ 1,007:
)
{
// Make sure we use the right protocol:
var srcFixed = this.icon.firstChild.getAttribute ('src', 2).replace(/^https?\:/, document.___location.protocol);
this.icon.firstChild.src = srcFixed;
this.icon.firstChild.title = this.icon.title;
this.icon = this.icon.firstChild;
Line 2,918:
var msg = ImageAnnotator.UI.get ('wpImageAnnotatorHelp', false, true);
if (!msg || !msg.lastChild) return null;
// Make sure we use the right protocol for all images:
var
if (imgs) {
for (var i = 0; i < imgs.length; i++) {
▲ var srcFixed =
}
}
if ( msg.childNodes.length == 1
&& msg.firstChild.nodeName.toLowerCase () == 'a'
|