From 796e729f52abaa0a701735deac8b943a6933ffa3 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Sun, 4 Sep 2022 15:08:47 +0400 Subject: [PATCH] Library button is disabled by setupViewer() --- static/skin/viewer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/skin/viewer.js b/static/skin/viewer.js index a8222c5ff..d31445473 100644 --- a/static/skin/viewer.js +++ b/static/skin/viewer.js @@ -267,10 +267,6 @@ function on_content_load() { window.onresize = handle_visual_viewport_change; window.onhashchange = handle_location_hash_change; -if ( ! viewerSettings.libraryButtonEnabled ) { - document.getElementById("kiwix_serve_taskbar_library_button").remove(); -} - updateCurrentBook(currentBook); handle_location_hash_change(); @@ -385,6 +381,10 @@ function setupSuggestions() { } function setupViewer() { + if ( ! viewerSettings.libraryButtonEnabled ) { + document.getElementById("kiwix_serve_taskbar_library_button").remove(); + } + handle_visual_viewport_change(); setupSuggestions();