Merge vichan-devel

This commit is contained in:
8chan 2014-06-10 23:13:42 +00:00
commit 1006aa3132
2 changed files with 12 additions and 2 deletions

View File

@ -160,7 +160,7 @@ function mod_dashboard() {
$latest = false;
}
setcookie('update', serialize($latest), time() + $config['check_updates_time'], $config['cookies']['jail'] ? $config['cookies']['path'] : '/', null, $_SERVER['HTTPS'], true);
setcookie('update', serialize($latest), time() + $config['check_updates_time'], $config['cookies']['jail'] ? $config['cookies']['path'] : '/', null, (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']), true);
}
if ($latest)

View File

@ -13,7 +13,17 @@ function unanimate_gif(e) {
$(e).parent().prepend(c);
c.attr('width', $(e).width());
c.attr('height',$(e).height());
c[0].getContext('2d').drawImage(e, 0, 0, $(e).width(), $(e).height());
function draw_image() {
c[0].getContext('2d').drawImage(e, 0, 0, $(e).width(), $(e).height())
};
// Fix drawing image before loaded. Note that Chrome needs to check .complete because load() is NOT called if loaded from cache.
if (!e.complete) {
e.onload = draw_image;
} else {
draw_image();
}
$(e).hide();
}