|
|
@ -191,8 +191,13 @@ $(document).ready(function(){ |
|
|
|
// check that this post doesn't already exist
|
|
|
|
if($('#' + id).length == 0) { |
|
|
|
if (notify) { |
|
|
|
var body = $(this).children('.body').html().replace(/<br\s*[\/]?>/gi, "\n"); |
|
|
|
var n = new Notification("New reply to "+ title, {body: $('<div/>').html(body).text()}); |
|
|
|
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()}); |
|
|
|
} |
|
|
|
} |
|
|
|
$(this).parent().insertBefore($('.post-wrapper:first')); |
|
|
|
new_posts++; |
|
|
|