Make use of Post::getNameBlock().

This commit is contained in:
Mayhem 2014-02-18 03:30:05 +01:00
parent 463947820f
commit 0e3f90fe4f
2 changed files with 2 additions and 7 deletions

View File

@ -3,8 +3,7 @@ Get =
{OP} = thread
excerpt = OP.info.subject?.trim() or
OP.info.comment.replace(/\n+/g, ' // ') or
Conf['Anonymize'] and 'Anonymous' or
$('.nameBlock', OP.nodes.info).textContent.trim()
OP.getNameBlock()
if excerpt.length > 70
excerpt = "#{excerpt[...67]}..."
"/#{thread.board}/ - #{excerpt}"

View File

@ -92,11 +92,7 @@ Unread =
return
openNotification: (post) ->
return unless Header.areNotificationsEnabled
name = if Conf['Anonymize']
'Anonymous'
else
$('.nameBlock', post.nodes.info).textContent.trim()
notif = new Notification "#{name} replied to you",
notif = new Notification "#{post.getNameBlock()} replied to you",
body: post.info.comment
icon: Favicon.logo
notif.onclick = ->