From d46014242d819292f011ef407c2dc5abc161e32c Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sat, 25 Apr 2020 17:43:56 +0200 Subject: [PATCH] Set page title. --- static/sfu.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/static/sfu.js b/static/sfu.js index 3cd8973..308fe7c 100644 --- a/static/sfu.js +++ b/static/sfu.js @@ -843,9 +843,11 @@ document.getElementById('disconnectbutton').onclick = function(e) { function start() { group = decodeURIComponent(location.pathname.replace(/^\/[a-z]*\//, '')); - let title = document.getElementById('title'); - if(group !== '') - title.textContent = group.charAt(0).toUpperCase() + group.slice(1); + let title = group.charAt(0).toUpperCase() + group.slice(1); + if(group !== '') { + document.title = title; + document.getElementById('title').textContent = title + } myid = randomid();