mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
Respecting the --nosearchbar option of kiwix-serve
If `kiwix-serve` is run with the `--nosearchbar` option the toolbar is disabled (hidden) in its viewer. Note however that certain actions performed by the viewer merely with the purpose of keeping the toolbar up-to-date are still carried out.
This commit is contained in:
@ -384,12 +384,18 @@ function setupSuggestions() {
|
||||
}
|
||||
|
||||
function setupViewer() {
|
||||
setInterval(handle_visual_viewport_change, 0);
|
||||
|
||||
const kiwixToolBarWrapper = document.getElementById('kiwixtoolbarwrapper');
|
||||
if ( ! viewerSettings.toolbarEnabled ) {
|
||||
return;
|
||||
}
|
||||
|
||||
kiwixToolBarWrapper.style.display = 'block';
|
||||
if ( ! viewerSettings.libraryButtonEnabled ) {
|
||||
document.getElementById("kiwix_serve_taskbar_library_button").remove();
|
||||
}
|
||||
|
||||
handle_visual_viewport_change();
|
||||
|
||||
setupSuggestions();
|
||||
|
||||
// cybook hack
|
||||
|
Reference in New Issue
Block a user