forked from leftypol/leftypol
Correct notification text for threads
This commit is contained in:
parent
807adaff90
commit
926b377032
|
@ -222,10 +222,11 @@ $(document).ready(function(){
|
||||||
if (notify === "all") {
|
if (notify === "all") {
|
||||||
if ($(this).hasClass('thread')){
|
if ($(this).hasClass('thread')){
|
||||||
var body = $(this).children('.post').children('.body').html().replace(/<br\s*[\/]?>/gi, "\n");
|
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 {
|
} else {
|
||||||
var body = $(this).children('.body').html().replace(/<br\s*[\/]?>/gi, "\n");
|
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){
|
if ($("div.post,div.thread").length > 1){
|
||||||
$(this).parent().insertBefore($($('div.post,div.thread').not('.post-hover').first()).parent());
|
$(this).parent().insertBefore($($('div.post,div.thread').not('.post-hover').first()).parent());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user