Library button is disabled by setupViewer()

This commit is contained in:
Veloman Yunkan 2022-09-04 15:08:47 +04:00
parent ae01790375
commit 796e729f52
1 changed files with 4 additions and 4 deletions

View File

@ -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();