mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-14 08:58:05 +00:00
Added show preview option
This commit is contained in:
parent
b4ede1d54f
commit
e13143229a
@ -308,14 +308,17 @@ var postExpandFunction = function( e, postLi )
|
|||||||
|
|
||||||
$postExpandedContent.slideDown( "fast" );
|
$postExpandedContent.slideDown( "fast" );
|
||||||
|
|
||||||
var previewContainer=$postExpandedContent.find(".preview-container")[0];
|
if ($.Options.getShowPreviewOpt() == 'enable')
|
||||||
/* was the preview added before... */
|
|
||||||
if ($(previewContainer).children().length == 0)
|
|
||||||
{
|
{
|
||||||
var link = originalPost.find("a[rel='nofollow']");
|
var previewContainer=$postExpandedContent.find(".preview-container")[0];
|
||||||
if (/(\.jpg)|(\.gif)|(\.png)|(\.jpeg)/.test(link.html().toLowerCase()))
|
/* was the preview added before... */
|
||||||
|
if ($(previewContainer).children().length == 0)
|
||||||
{
|
{
|
||||||
$(previewContainer).append($("<img src='" + link.html() + "' class='image-preview' />"));
|
var link = originalPost.find("a[rel='nofollow']");
|
||||||
|
if (/(\.jpg)|(\.gif)|(\.png)|(\.jpeg)/.test(link.html().toLowerCase()))
|
||||||
|
{
|
||||||
|
$(previewContainer).append($("<img src='" + link.html() + "' class='image-preview' />"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// insert "reply_to" before
|
// insert "reply_to" before
|
||||||
|
Loading…
Reference in New Issue
Block a user