Browse Source

Correct notification text for threads

pull/52/head
discomrade 3 years ago
parent
commit
78ab47d433
  1. 3
      js/mod/recent-posts-auto-reload.js

3
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(/<br\s*[\/]?>/gi, "\n");
var n = new Notification("New thread in "+title, {body: $('<div/>').html(body).text()});
} else {
var body = $(this).children('.body').html().replace(/<br\s*[\/]?>/gi, "\n");
var n = new Notification("New reply to "+title, {body: $('<div/>').html(body).text()});
}
var n = new Notification("New reply to "+title, {body: $('<div/>').html(body).text()});
}
if ($("div.post,div.thread").length > 1){
$(this).parent().insertBefore($($('div.post,div.thread').not('.post-hover').first()).parent());

Loading…
Cancel
Save