summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 734241465..3c9efb886 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3212,6 +3212,15 @@ function rcube_webmail()
this.set_classname(mbox_li, 'selected', true);
}
}
+
+ // also update mailbox name in window title
+ if (document.title)
+ {
+ var doc_title = String(document.title);
+ var reg = new RegExp(this.env.mailbox.toLowerCase(), 'i');
+ if (this.env.mailbox && doc_title.match(reg))
+ document.title = doc_title.replace(reg, mbox).replace(/^\([0-9]+\)\s+/i, '');
+ }
this.env.mailbox = mbox;
};