Merge pull request #498 from kiwix/issue/446

fixed suggestion system
This commit is contained in:
Matthieu Gautier 2021-04-28 14:40:06 +02:00 committed by GitHub
commit dd795bd56d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 83 additions and 80 deletions

View File

@ -3,6 +3,8 @@ function htmlDecode(input) {
return doc.documentElement.textContent; return doc.documentElement.textContent;
} }
const jq = jQuery.noConflict(true);
jq(document).ready(() => {
(function ($) { (function ($) {
const root = $( `link[type='root']` ).attr("href"); const root = $( `link[type='root']` ).attr("href");
const bookName = window.location.pathname.split(`${root}/`)[1].split('/')[0]; const bookName = window.location.pathname.split(`${root}/`)[1].split('/')[0];
@ -82,4 +84,5 @@ function htmlDecode(input) {
$('label[for="kiwix_button_show_toggle"], .kiwix_button_cont').removeClass('searching'); $('label[for="kiwix_button_show_toggle"], .kiwix_button_cont').removeClass('searching');
} }
}); });
})(jQuery); })(jq);
})

View File

@ -1,6 +1,6 @@
<link type="text/css" href="{{root}}/skin/jquery-ui/jquery-ui.min.css" rel="Stylesheet" /> <link type="text/css" href="{{root}}/skin/jquery-ui/jquery-ui.min.css" rel="Stylesheet" />
<link type="text/css" href="{{root}}/skin/jquery-ui/jquery-ui.theme.min.css" rel="Stylesheet" /> <link type="text/css" href="{{root}}/skin/jquery-ui/jquery-ui.theme.min.css" rel="Stylesheet" />
<link type="text/css" href="{{root}}/skin/taskbar.css" rel="Stylesheet" /> <link type="text/css" href="{{root}}/skin/taskbar.css" rel="Stylesheet" />
<script type="text/javascript" src="{{root}}/skin/jquery-ui/external/jquery/jquery.js"></script> <script type="text/javascript" src="{{root}}/skin/jquery-ui/external/jquery/jquery.js" defer></script>
<script type="text/javascript" src="{{root}}/skin/jquery-ui/jquery-ui.min.js"></script> <script type="text/javascript" src="{{root}}/skin/jquery-ui/jquery-ui.min.js" defer></script>
<script type="text/javascript" src="{{root}}/skin/taskbar.js" async></script> <script type="text/javascript" src="{{root}}/skin/taskbar.js" defer></script>