Get rid of replace() in notification.

This commit is contained in:
really-need-an-api-key 2018-10-12 16:47:48 +02:00
parent 7be86886eb
commit eada83aea4
2 changed files with 3 additions and 3 deletions

View File

@ -489,7 +489,7 @@ Callbacks = {
}
if (ping) {
pingMessage(true, "PM: " + name, msg.last().text());
pingMessage(true, "PM: " + name, $(msg.children()[2]).text());
}
},

View File

@ -1662,7 +1662,7 @@ function addChatMessage(data) {
}
}
pingMessage(isHighlight, data.username, div.text());
pingMessage(isHighlight, data.username, $(div.children()[2]).text());
}
function trimChatBuffer() {
@ -1698,7 +1698,7 @@ function pingMessage(isHighlight, notificationTitle, notificationBody) {
if (USEROPTS.notifications === "always" || (USEROPTS.notifications === "onlyping" &&
isHighlight)) {
showDesktopNotification(notificationTitle, notificationBody.replace(/\[[^\]]+\]/g, ''));
showDesktopNotification(notificationTitle, notificationBody);
}
}
}