WebHost: Fixed some document titles (#1063)

This commit is contained in:
recklesscoder
2022-10-07 00:01:07 +02:00
committed by GitHub
parent 4c266e6eff
commit 38b7bdfe60
5 changed files with 5 additions and 4 deletions

View File

@@ -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-_]*$/);