Änderungen

Spring zu: Navigation, suche

MediaWiki:Common.js

174 Bytes hinzugefügt, 20:41, 23. Okt. 2014
keine Bearbeitungszusammenfassung
(function ($) {
$(function() {var fullImage = $('html#file > a').attr;var regionBrowser = $('xmlns:svg<div />', "http{ id://www'region-browser'}); fullImage.w3.org/2000/svg"after(regionBrowser); 
$('.region-info').each(function() {
var that = $(this);
var src = $('.fullMedia > a').attr('href');
var c = that.attr('title').split(' ');
var thumbHeight = 100;
svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
svg.setAttribute('width', 60);
svg.setAttribute('height', 80);
svg.setAttribute('preserveAspectRatio', 'none');
 
var ratio = thumbHeight / c[3];
 
 
svg.setAttribute('viewBox', (c[0] - (c[2] / 2)) + ' ' + (c[1] - (c[3] / 2)) + ' ' + c[2] + ' ' + c[3]);
svg.setAttribute('height', thumbHeight);
svg.setAttribute('width', (c[2] * 1.5) * ratio);
image = document.createElementNS("http://www.w3.org/2000/svg", "image");
image.setAttributeNS('http://www.w3.org/1999/xlink', 'href', src);
$(image).appendTo(svg);
that$(svg).htmlappendTo(svgregionBrowser);
});
 
});
})(jQuery);
Anonymer Benutzer

Navigationsmenü