MediaWiki:Common.js: Ferqê çımraviyarnayışan

Content deleted Content added
Update forcePreview() to avoid defining Array.prototype.intersects, which breaks other tools (phab:T277753) – copying changes from zh:MediaWiki:Common.js/edit.js by User:Xiplus and User:Jon (WMF)
 
Line 406:
for (j = 0 ; j < UnitNode.childNodes.length ; j++ ) {
var temp = UnitNode.childNodes[j];
if (['center', 'mw-halign-center'].some(function(className) { return temp.classList.contains(className=="center"); })) { units.push(temp); }
}
var wrap;
for (j = 0 ; j < units.length ; j++) {
currentimage=units[j];
wrap = document.createElement('div');
currentimagewrap.id = "ImageGroupsGr" + i + "Im" + j;
currentimage.parentNode.insertBefore(wrap, currentimage);
wrap.appendChild(currentimage);
var imghead = document.createElement("div");
var leftlink = document.createElement("a");
Line 431 ⟶ 435:
appendChild(rightlink);
}
if (units.length>1) currentimagewrap.insertBefore(imghead,currentimagewrap.childNodes[0]);
if (j != 0) currentimagewrap.style.display="none";
}
}