source/help.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-)
New commits: commit 4736be43b377d0493ee0327f605a8551eca0d647 Author: Jan Holesovsky <ke...@collabora.com> Date: Thu Dec 22 21:42:33 2016 +0100 help.js: Speedup the search. diff --git a/source/help.js b/source/help.js index eac85ba..6de81ed 100644 --- a/source/help.js +++ b/source/help.js @@ -127,18 +127,21 @@ function displayResult(file, moduleName, language, system) { var debouncer = null; $(document).ready(function() { - $('#search-bar').keyup(function() { - if(debouncer) { - clearTimeout(debouncer); - } - debouncer = setTimeout(function(){ - $("#BottomLeft ul li" ).show(); - if($('#search-bar').val()) { - $("#BottomLeft ul a:not(:contains('" + $('#search-bar').val() + "'))" ).parent().hide(); - } - }, 500); - }); - }); + $('#search-bar').keyup(function() { + if (debouncer) { + clearTimeout(debouncer); + } + debouncer = setTimeout(function(){ + if ($('#search-bar').val()) { + $("#BottomLeft ul a:not(:contains('" + $('#search-bar').val() + "'))" ).parent().hide(); + $("#BottomLeft ul a:contains('" + $('#search-bar').val() + "')" ).parent().show(); + } + else { + $("#BottomLeft ul li" ).show(); + } + }, 200); + }); +}); //http://papermashup.com/read-url-get-variables-withjavascript/ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits