Highlight on private message
This commit is contained in:
parent
ddadf4652c
commit
98465ce9e5
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user