From 38b7bdfe60d8deda6677ceb718f309121c6a2b1a Mon Sep 17 00:00:00 2001 From: recklesscoder <57289227+recklesscoder@users.noreply.github.com> Date: Fri, 7 Oct 2022 00:01:07 +0200 Subject: [PATCH] WebHost: Fixed some document titles (#1063) --- WebHostLib/static/assets/tutorial.js | 5 +++++ WebHostLib/templates/check.html | 1 - WebHostLib/templates/generate.html | 1 - WebHostLib/templates/hostGame.html | 1 - WebHostLib/templates/startPlaying.html | 1 - 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/WebHostLib/static/assets/tutorial.js b/WebHostLib/static/assets/tutorial.js index 23d2f076..39fc3569 100644 --- a/WebHostLib/static/assets/tutorial.js +++ b/WebHostLib/static/assets/tutorial.js @@ -27,6 +27,11 @@ window.addEventListener('load', () => { tutorialWrapper.innerHTML += (new showdown.Converter()).makeHtml(results); adjustHeaderWidth(); + const title = document.querySelector('h1') + if (title) { + document.title = title.textContent; + } + // Reset the id of all header divs to something nicer const headers = Array.from(document.querySelectorAll('h1, h2, h3, h4, h5, h6')); const scrollTargetIndex = window.location.href.search(/#[A-z0-9-_]*$/); diff --git a/WebHostLib/templates/check.html b/WebHostLib/templates/check.html index 64f19b0f..04b51340 100644 --- a/WebHostLib/templates/check.html +++ b/WebHostLib/templates/check.html @@ -1,7 +1,6 @@ {% extends 'pageWrapper.html' %} {% block head %} - {{ super() }} Mystery Check Result diff --git a/WebHostLib/templates/generate.html b/WebHostLib/templates/generate.html index aa16a47d..eff42700 100644 --- a/WebHostLib/templates/generate.html +++ b/WebHostLib/templates/generate.html @@ -1,7 +1,6 @@ {% extends 'pageWrapper.html' %} {% block head %} - {{ super() }} Generate Game diff --git a/WebHostLib/templates/hostGame.html b/WebHostLib/templates/hostGame.html index 55d155c7..2bcb993a 100644 --- a/WebHostLib/templates/hostGame.html +++ b/WebHostLib/templates/hostGame.html @@ -1,7 +1,6 @@ {% extends 'pageWrapper.html' %} {% block head %} - {{ super() }} Upload Multidata diff --git a/WebHostLib/templates/startPlaying.html b/WebHostLib/templates/startPlaying.html index 157d6de2..436af3df 100644 --- a/WebHostLib/templates/startPlaying.html +++ b/WebHostLib/templates/startPlaying.html @@ -1,7 +1,6 @@ {% extends 'pageWrapper.html' %} {% block head %} - {{ super() }} Start Playing {% endblock %}