1
0
mirror of https://github.com/flarum/core.git synced 2025-07-23 09:41:26 +02:00

Set document.title on every page

This commit is contained in:
Toby Zerner
2015-05-18 14:28:15 +09:30
parent 39dd2f9b9b
commit d7facbd90a
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];