From 78ab47d433b12cc96d00775ab19df5f702d6de9d Mon Sep 17 00:00:00 2001 From: discomrade Date: Sun, 17 Oct 2021 21:57:12 -0100 Subject: [PATCH] Correct notification text for threads --- js/mod/recent-posts-auto-reload.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/mod/recent-posts-auto-reload.js b/js/mod/recent-posts-auto-reload.js index 0db4ea62..c16d5fdb 100644 --- a/js/mod/recent-posts-auto-reload.js +++ b/js/mod/recent-posts-auto-reload.js @@ -222,10 +222,11 @@ $(document).ready(function(){ if (notify === "all") { if ($(this).hasClass('thread')){ var body = $(this).children('.post').children('.body').html().replace(//gi, "\n"); + var n = new Notification("New thread in "+title, {body: $('
').html(body).text()}); } else { var body = $(this).children('.body').html().replace(//gi, "\n"); + var n = new Notification("New reply to "+title, {body: $('
').html(body).text()}); } - var n = new Notification("New reply to "+title, {body: $('
').html(body).text()}); } if ($("div.post,div.thread").length > 1){ $(this).parent().insertBefore($($('div.post,div.thread').not('.post-hover').first()).parent());