diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-05-01 08:39:47 -0700 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-05-01 08:39:47 -0700 |
commit | 5affe093aba97a0e4ac559b685a240d568929ffb (patch) | |
tree | e99a3b5451064f004dde34f47e5a802bef8c58ef /plugins/Comet/updatetimeline.js | |
parent | 1a61a171cdb39444e2c0fbed7cf3a92e0ec271df (diff) |
add in_reply_to link and make HTML in source work correctly
Diffstat (limited to 'plugins/Comet/updatetimeline.js')
-rw-r--r-- | plugins/Comet/updatetimeline.js | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/plugins/Comet/updatetimeline.js b/plugins/Comet/updatetimeline.js index e89b3bddf..170949e9b 100644 --- a/plugins/Comet/updatetimeline.js +++ b/plugins/Comet/updatetimeline.js @@ -54,7 +54,8 @@ var updater = function() function makeNoticeItem(data) { user = data['user']; - html = data['html'].replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); + html = data['html'].replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"'); + source = data['source'].replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"'); ni = "<li class=\"hentry notice\" id=\"notice-"+data['id']+"\">"+ "<div class=\"entry-title\">"+ @@ -77,9 +78,19 @@ var updater = function() "</dl>"+ "<dl class=\"device\">"+ "<dt>From</dt> "+ - "<dd>"+data['source']+"</dd>"+ - "</dl>"+ - "</div>"+ + "<dd>"+source+"</dd>"+ // may have a link, I think + "</dl>"; + + if (data['in_reply_to_status_id']) { + ni = ni+" <dl class=\"response\">"+ + "<dt>To</dt>"+ + "<dd>"+ + "<a href=\""+data['in_reply_to_status_url']+"\" rel=\"in-reply-to\">in reply to</a>"+ + "</dd>"+ + "</dl>"; + } + + ni = ni+"</div>"+ "<div class=\"notice-options\">"; if (_userid != 0) { |