diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js index 9ff897a..c390d89 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js @@ -412,11 +412,12 @@ function currentTheme() { } function updateDocumentTitle(rds = null) { - if (!Number.isFinite(lastFreqHz)) { + const freqHz = activeChannelFreqHz(); + if (!Number.isFinite(freqHz)) { document.title = originalTitle; return; } - const parts = [formatFreq(lastFreqHz)]; + const parts = [formatFreq(freqHz)]; const ps = rds?.program_service; if (ps && ps.length > 0) { parts.push(ps); diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/vchan.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/vchan.js index b07c86d..9521e44 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/vchan.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/vchan.js @@ -188,6 +188,9 @@ function vchanRender() { picker.appendChild(addBtn); vchanSyncAccentUI(); + if (typeof updateDocumentTitle === "function" && typeof activeChannelRds === "function") { + updateDocumentTitle(activeChannelRds()); + } vchanRenderSchedulerRelease(); } @@ -389,6 +392,9 @@ function vchanSyncAccentUI() { } else if (typeof _origRefreshFreqDisplay === "function") { _origRefreshFreqDisplay(); } + if (typeof updateDocumentTitle === "function" && typeof activeChannelRds === "function") { + updateDocumentTitle(activeChannelRds()); + } } // Saved reference to the original refreshFreqDisplay from app.js.