From 0e3f90fe4fd1b7bb1d15612ffefd6c0f7ccc097b Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 18 Feb 2014 03:30:05 +0100 Subject: [PATCH] Make use of Post::getNameBlock(). --- src/General/Get.coffee | 3 +-- src/Monitoring/Unread.coffee | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/General/Get.coffee b/src/General/Get.coffee index 0490b8403..d888643d6 100644 --- a/src/General/Get.coffee +++ b/src/General/Get.coffee @@ -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}" diff --git a/src/Monitoring/Unread.coffee b/src/Monitoring/Unread.coffee index 067f617a9..08a1d476b 100644 --- a/src/Monitoring/Unread.coffee +++ b/src/Monitoring/Unread.coffee @@ -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 = ->