Added flash size constraining

This commit is contained in:
Marcin Kurczewski 2014-08-09 19:52:57 +02:00
parent abbaa35188
commit 9b9ba9c33c

View file

@ -1,7 +1,21 @@
function constrainFlashSize()
{
var target = $('.post-type-flash object');
var container = $('#inner-content');
target.width('');
if (target.width() > container.width())
{
target.width(container.width())
target.height(container.width() * target.attr('height') / target.attr('width'));
}
}
$(function()
{
function onDomUpdate()
{
constrainFlashSize();
$('#sidebar .permalink').bindOnce('select-link', 'click', function(e)
{
e.preventDefault();