mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Added flash size constraining
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user