MediaWiki:Common.js: Unterschied zwischen den Versionen

aus Memory Alpha, der freien deutschen Star-Trek-Datenbank
Spring zu: Navigation, suche
imported>Shisma
(ich hoffe ich hab alles richtig gemacht)
imported>Shisma
Zeile 1: Zeile 1:
 +
/* fix für verlinkte svg dateien */
  
 +
for(var i=0; i<document.images.length; i++)
 +
{
 +
  var img = document.images[i];
 +
  var imgName = img.src.toUpperCase();
 +
  if (imgName.substring(imgName.length-3, imgName.length) == "SVG")
 +
  {
 +
var newobj = document.createElement('object');
 +
newobj.id = img.id;
 +
newobj.className = img.className;
 +
newobj.data = img.src;
 +
newobj.title = img.title;
 +
newobj.width = img.getAttribute('width', 0);
 +
newobj.height = img.getAttribute('height', 0);
 +
newobj.style.display = "inline-block";
 +
newobj.style.border = "none";
 +
img.parentNode.replaceChild(newobj, img);
 +
  }
 +
}

Version vom 1. April 2009, 13:55 Uhr

/* fix für verlinkte svg dateien */

for(var i=0; i<document.images.length; i++)
 {
  var img = document.images[i];
  var imgName = img.src.toUpperCase();
  if (imgName.substring(imgName.length-3, imgName.length) == "SVG")
  {
	var newobj = document.createElement('object');
	newobj.id = img.id;
	newobj.className = img.className;
	newobj.data = img.src;
	newobj.title = img.title;
	newobj.width = img.getAttribute('width', 0);
	newobj.height = img.getAttribute('height', 0);
	newobj.style.display = "inline-block";
	newobj.style.border = "none";
	img.parentNode.replaceChild(newobj, img);
  }
 }