Highlight on private message

This commit is contained in:
Mattias Erming 2014-08-03 16:30:31 -07:00
parent ddadf4652c
commit 98465ce9e5
2 changed files with 6 additions and 5 deletions

View File

@ -369,16 +369,17 @@ $(function() {
});
chat.on("msg", ".messages", function(e, target, msg) {
var btn = sidebar.find(".chan[data-target=" + target + "]:not(.active)");
var query = btn.hasClass("query");
var type = msg.type;
var highlight = type.contains("highlight");
if (highlight) {
if (highlight || query) {
pop.play();
if (document.hidden || !$(target).hasClass("active")) {
favico.badge("!");
}
}
var btn = sidebar.find(".chan[data-target=" + target + "]:not(.active)");
if (btn.length === 0) {
return;
}
@ -397,7 +398,7 @@ $(function() {
if (badge.length !== 0) {
var i = (parseInt(badge.html()) || 0) + 1;
badge.html(i);
if (highlight) {
if (highlight || query) {
badge.addClass("highlight");
}
}

View File

@ -1,7 +1,7 @@
{
"name": "shout",
"description": "A web IRC client",
"version": "0.8.7",
"version": "0.8.8",
"homepage": "http://github.com/erming/shout",
"author": {
"name": "Mattias Erming",