mirror of https://github.com/kiwix/libkiwix.git
Introduced setupViewer()
This commit is contained in:
parent
da23e4eca4
commit
ae01790375
|
@ -312,7 +312,7 @@ function setupAutoHidingOfTheToolbar() {
|
|||
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
function setupSuggestions() {
|
||||
const kiwixSearchBox = document.querySelector('#kiwixsearchbox');
|
||||
const kiwixSearchFormWrapper = document.querySelector('.kiwix_searchform');
|
||||
|
||||
|
@ -382,6 +382,12 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
document.querySelector('label[for="kiwix_button_show_toggle"]').classList.remove('searching');
|
||||
document.querySelector('.kiwix_button_cont').classList.remove('searching');
|
||||
});
|
||||
}
|
||||
|
||||
function setupViewer() {
|
||||
handle_visual_viewport_change();
|
||||
|
||||
setupSuggestions();
|
||||
|
||||
// cybook hack
|
||||
if (navigator.userAgent.indexOf("bookeen/cybook") != -1) {
|
||||
|
@ -391,4 +397,4 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
if (document.body.clientWidth < 520) {
|
||||
setupAutoHidingOfTheToolbar();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</script>
|
||||
</head>
|
||||
|
||||
<body style="margin:0" onload="handle_visual_viewport_change()">
|
||||
<body style="margin:0" onload="setupViewer()">
|
||||
<span class="kiwix">
|
||||
<span id="kiwixtoolbar" class="ui-widget-header">
|
||||
<div class="kiwix_centered">
|
||||
|
|
Loading…
Reference in New Issue