Fix for kiwix-serve --nosearchbar

In kiwix-serve --nosearchbar mode the viewer is still engaged and
its setup must completed appropriately, otherwise the content requested
via the URL is not loaded.
This commit is contained in:
Veloman Yunkan
2025-11-28 17:02:49 +04:00
parent b65074f961
commit ca808718f7
2 changed files with 8 additions and 2 deletions

View File

@@ -588,6 +588,7 @@ function setupViewer() {
const kiwixToolBarWrapper = document.getElementById('kiwixtoolbarwrapper');
if ( ! viewerSettings.toolbarEnabled ) {
finishViewerSetup();
return;
}
@@ -636,6 +637,11 @@ function updateUIText() {
function finishViewerSetupOnceTranslationsAreLoaded()
{
updateUIText();
finishViewerSetup();
}
function finishViewerSetup()
{
handle_location_hash_change();
window.onhashchange = handle_location_hash_change;