summaryrefslogtreecommitdiff
path: root/static/pichat.js
diff options
context:
space:
mode:
authorsostler <sbostler@gmail.com>2009-11-08 23:53:45 -0500
committersostler <sbostler@gmail.com>2009-11-08 23:53:45 -0500
commitc179e3da706fb1553d462caa2793f0e042a9c4b3 (patch)
tree270f47a21ab84cad8f37903ea0d927635bcf4ed8 /static/pichat.js
parenta87e6d26c5a4925ade9f24ae1741abd7c3d3f351 (diff)
Added image links
Diffstat (limited to 'static/pichat.js')
-rwxr-xr-xstatic/pichat.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/static/pichat.js b/static/pichat.js
index b12c772..5567ea8 100755
--- a/static/pichat.js
+++ b/static/pichat.js
@@ -62,7 +62,9 @@ function buildMessageDiv(msg) {
var match = URLRegex.exec(msg.content)
if (match) {
return '<div class="msgDev"><b>' + msg.nick + ': </b>'
- + '<img height="150" width="150" src="' + match[0] + '" /></div>';
+ + '<a href="' + match[0] + '" target="_blank">'
+ + '<img height="150" width="150" src="'
+ + match[0] + '" /></a></div>';
} else {
return '<div class="msgDiv"><b>' + msg.nick + ": </b>"
+ msg.content + "</div>";