client: separate NEW vs NEW-PM titles, move user count to the end of the title

This commit is contained in:
mappu 2017-02-05 20:52:24 +13:00
parent 9060b87e94
commit 226e6751c6

View File

@ -765,10 +765,15 @@ var toggle_joinparts = function(ev) {
/* */ /* */
var updateTitle = function() { var updateTitle = function() {
document.title = var prefix = "";
($(".unread").length ? "[NEW PM] " : "") + var unrTabs = $(".unread");
"("+userlist.count()+") "+ if (unrTabs.length === 1 && unrTabs[0].getAttribute('data-tab') == "tab-main") {
hub_hubname; prefix = "[NEW] "
} else if (unrTabs.length > 0) {
prefix = "[NEW PM] "
}
document.title = prefix + hub_hubname + "("+userlist.count()+") "
}; };
var sock = {}; var sock = {};