mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-13 09:35:37 +00:00
bugfix: PageTitle works again (#236)
This commit is contained in:
@@ -294,7 +294,7 @@ function changeDirectory (selected) {
|
||||
const title = document.querySelector('h1')
|
||||
title.innerHTML = ''
|
||||
|
||||
const rootLink = createDirectoryBreadcrumb('OliveTin', null)
|
||||
const rootLink = createDirectoryBreadcrumb(window.pageTitle, null)
|
||||
title.appendChild(rootLink)
|
||||
|
||||
for (const dir of window.directoryNavigation) {
|
||||
|
||||
@@ -115,10 +115,15 @@ function processWebuiSettingsJson (settings) {
|
||||
document.querySelector('#perma-widget').hidden = !settings.ShowNavigation
|
||||
document.querySelector('footer[title="footer"]').hidden = !settings.ShowFooter
|
||||
|
||||
window.pageTitle = 'OliveTin'
|
||||
|
||||
if (settings.PageTitle) {
|
||||
document.title = settings.PageTitle
|
||||
window.pageTitle = settings.PageTitle
|
||||
|
||||
document.title = window.pageTitle
|
||||
|
||||
const titleElem = document.querySelector('#page-title')
|
||||
if (titleElem) titleElem.innerText = settings.PageTitle
|
||||
if (titleElem) titleElem.innerText = window.pageTitle
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user