mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-03-13 05:51:03 +00:00
fix options image preview showing
This commit is contained in:
parent
29b82d260c
commit
045836a020
@ -377,13 +377,7 @@ function tickOptionsPostPreview() {
|
||||
|
||||
if ($.Options.displayPreview.val === 'enable') {
|
||||
imgPreviewCont.empty();
|
||||
var links = elem.children().first().find('a[rel="nofollow"]');
|
||||
if (links.length) {
|
||||
setPostImagePreview(elem, links);
|
||||
imgPreviewCont.show();
|
||||
} else {
|
||||
imgPreviewCont.hide();
|
||||
}
|
||||
setPostImagePreview(elem, elem.children().first().find('a'));
|
||||
} else {
|
||||
imgPreviewCont.hide();
|
||||
}
|
||||
|
@ -807,5 +807,9 @@ function setPostImagePreview(elem, links) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (previewContainer.children().length)
|
||||
previewContainer.show();
|
||||
else
|
||||
previewContainer.hide();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user