lib/jschat/http/public/javascripts/app/helpers/text_helper.js in jschat-0.2.9 vs lib/jschat/http/public/javascripts/app/helpers/text_helper.js in jschat-0.3.0

- old
+ new

@@ -70,14 +70,14 @@ $A(text.split(/(https?:\/\/[^\s]*)/gi)).each(function(link) { if (link.match(/href="/)) { result += link; } else { - if (LinkHelper.youtube_url(link)) { + if (LinkHelper.youtube_url(link) && !JsChat.user.hideImages) { result += link.replace(link, LinkHelper.youtube(link)); - } else if (LinkHelper.vimeo_url(link)) { + } else if (LinkHelper.vimeo_url(link) && !JsChat.user.hideImages) { result += link.replace(link, LinkHelper.vimeo(link)); - } else if (LinkHelper.image_url(link)) { + } else if (LinkHelper.image_url(link) && !JsChat.user.hideImages) { result += link.replace(link, LinkHelper.image(link)); } else if (LinkHelper.url(link)) { result += link.replace(link, LinkHelper.link(link)); } else { result += link;