Commit 744c575a authored by JC Brand's avatar JC Brand

Bugfix. Message counter was not replacing previous count

parent a4b69ded
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
xmppchat.updateMsgCounter = function () { xmppchat.updateMsgCounter = function () {
this.msg_counter += 1; this.msg_counter += 1;
if (this.msg_counter > 0) { if (this.msg_counter > 0) {
if (document.title.search(/^Messages \(\d\) /) === -1) { if (document.title.search(/^Messages \(\d\) /) == -1) {
document.title = "Messages (" + this.msg_counter + ") " + document.title; document.title = "Messages (" + this.msg_counter + ") " + document.title;
} else { } else {
document.title = document.title.replace(/^Messages \(\d\) /, "Messages (" + this.msg_counter + ") "); document.title = document.title.replace(/^Messages \(\d\) /, "Messages (" + this.msg_counter + ") ");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment