Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
m +audio
m derp
Line 177: Line 177:
obj.children('embed').attr('width', width).attr('height', youtubeHelper.chromeSize); // Set <embed> height
obj.children('embed').attr('width', width).attr('height', youtubeHelper.chromeSize); // Set <embed> height
}
}
var ratio = youtubeHelper.ratioR.exec($(youtube).attr('class'));
else {
if(ratio != null) {
var ratio = youtubeHelper.ratioR.exec($(youtube).attr('class'));
ratio = parseFloat(ratio[1])/parseFloat(ratio[2]);
if(ratio != null) {
var newHeight = Math.round(width / ratio + youtubeHelper.chromeSize).toString();
ratio = parseFloat(ratio[1])/parseFloat(ratio[2]);
obj.attr('width', width).attr('height', newHeight); // Set <object> height
var newHeight = Math.round(width / ratio + youtubeHelper.chromeSize).toString();
obj.children('embed').attr('width', width).attr('height', newHeight); // Set <embed> height
obj.attr('width', width).attr('height', newHeight); // Set <object> height
obj.children('embed').attr('width', width).attr('height', newHeight); // Set <embed> height
}
}
}
},
},