1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-29 01:34:31 +01:00

Merge pull request #286 from marktaiwan/master

Fix bug with inline expansion with Unanimate Gif
This commit is contained in:
Marcin Łabanowski 2014-11-29 15:49:57 +01:00
commit ab3fe1ecb8

View File

@ -19,7 +19,7 @@ onready(function(){
for (var i = 0; i < link.length; i++) { for (var i = 0; i < link.length; i++) {
if (typeof link[i] == "object" && link[i].childNodes && typeof link[i].childNodes[0] !== 'undefined' && link[i].childNodes[0].src && link[i].childNodes[0].className.match(/post-image/) && !link[i].className.match(/file/)) { if (typeof link[i] == "object" && link[i].childNodes && typeof link[i].childNodes[0] !== 'undefined' && link[i].childNodes[0].src && link[i].childNodes[0].className.match(/post-image/) && !link[i].className.match(/file/)) {
link[i].onclick = function(e) { link[i].onclick = function(e) {
var img, post_body, still_open; var img, post_body, still_open, canvas;
var thumb = this.childNodes[0]; var thumb = this.childNodes[0];
var padding = 5; var padding = 5;
var boardlist = $('.boardlist')[0]; var boardlist = $('.boardlist')[0];
@ -43,8 +43,10 @@ onready(function(){
this.dataset.expanded = 'true'; this.dataset.expanded = 'true';
if (thumb.tagName === 'CANVAS') { if (thumb.tagName === 'CANVAS') {
this.removeChild(thumb); canvas = thumb;
thumb.style.display = 'block'; thumb = thumb.nextSibling;
this.removeChild(canvas);
canvas.style.display = 'block';
} }
thumb.style.opacity = '0.4'; thumb.style.opacity = '0.4';