diff --git a/css/style.css b/css/style.css index 714bf9a..59ab5d3 100644 --- a/css/style.css +++ b/css/style.css @@ -951,6 +951,16 @@ button.disabled:hover display: none; padding: 5px 5px 0 5px; } +.image-preview +{ + max-height: 500px; + width: auto; +} +.preview-container +{ + max-height: 500px; + width: 100%; +} .post-stats { margin: 0 10px 0 55px; diff --git a/home.html b/home.html index 9a72afe..6ca774a 100644 --- a/home.html +++ b/home.html @@ -244,6 +244,8 @@ +
+
diff --git a/js/interface_common.js b/js/interface_common.js index b235940..4733d14 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -307,7 +307,17 @@ var postExpandFunction = function( e, postLi ) originalLi.append(originalPost); $postExpandedContent.slideDown( "fast" ); - + + var previewContainer=$postExpandedContent.find(".preview-container")[0]; + /* was the preview added before... */ + if ($(previewContainer).children().length == 0) + { + var link = originalPost.find("a[rel='nofollow']"); + if (/(\.jpg)|(\.gif)|(\.png)|(\.jpeg)/.test(link.html().toLowerCase())) + { + $(previewContainer).append($("")); + } + } // insert "reply_to" before requestRepliedBefore(originalLi); // insert replies to this post after