forked from leftypol/leftypol
Use stored title instead of document.title in notifications
Prevents number of unreads being added to notificaiton thread name
This commit is contained in:
parent
10c772efad
commit
d5704ec4eb
2 changed files with 3 additions and 3 deletions
|
@ -243,7 +243,7 @@ $(document).ready(function(){
|
|||
}
|
||||
if (notify === "all" || (notify === "mention" && $(this).find('.own_post').length)) {
|
||||
var body = $(this).children('.body').html().replace(/<br\s*[\/]?>/gi, "\n");
|
||||
var n = new Notification("New reply to "+$('title').text(), {body: $('<div/>').html(body).text()});
|
||||
var n = new Notification("New reply to "+title, {body: $('<div/>').html(body).text()});
|
||||
}
|
||||
if ($("div.post").length > 1){
|
||||
$(this).insertAfter($('div.post:not(.post-hover):last').next()).after('<br class="clear">');
|
||||
|
|
|
@ -221,7 +221,7 @@ $(document).ready(function(){
|
|||
// Notify on all posts, not just the first unread
|
||||
if (notify === "all") {
|
||||
var body = $(this).children('.body').html().replace(/<br\s*[\/]?>/gi, "\n");
|
||||
var n = new Notification("New reply to "+$('title').text(), {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…
Add table
Add a link
Reference in a new issue