Set document.title on every page

This commit is contained in:
Toby Zerner
2015-05-18 14:28:15 +09:30
parent d904efb556
commit 3462dd68d2
6 changed files with 15 additions and 3 deletions

View File

@ -10,6 +10,10 @@ class App {
this.initializers.toArray().forEach((initializer) => initializer(this));
}
setTitle(title) {
document.title = (title ? title+' - ' : '')+this.config['forum_title'];
}
route(name, params) {
var url = this.routes[name][0].replace(/:([^\/]+)/g, function(m, t) {
var value = params[t];