summaryrefslogtreecommitdiff
path: root/help3xsl/online_transform.xsl
diff options
context:
space:
mode:
authorIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2018-01-31 13:01:20 +0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2018-01-31 15:14:36 +0100
commit11adc4492b11253c5d24d217354581956da1f52b (patch)
treeffd013f9ea6e556e5a7f486c087603da490f5517 /help3xsl/online_transform.xsl
parent875dbb65c79bd52049c270197aaa71cc243821fb (diff)
Fixes for MS browsers and tweaks to fuzzy search
Some experimental JS tech had slipped into the mix. Search settings should also be a bit more performant now. Change-Id: Ifae9986efc02d20fefa9480ae463107fe4743944 Reviewed-on: https://gerrit.libreoffice.org/48988 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl/online_transform.xsl')
-rw-r--r--help3xsl/online_transform.xsl15
1 files changed, 7 insertions, 8 deletions
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 8b215f218c..2feda208ac 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -306,16 +306,15 @@
var liElements = Array.prototype.slice.call(document.getElementsByClassName("list")[0].getElementsByTagName("li")).map(function(elm) {
var item = elm;
var linktext = item.childNodes[0].textContent;
- return {
- item, linktext
- };
+ var fuseObject = { item: item, linktext: linktext };
+ return fuseObject;
});
var fuse = new Fuse(liElements, {
keys: ["linktext"],
- distance: 80,
+ distance: 60,
location: 0,
- threshold: 0.4,
+ threshold: 0.2,
tokenize: true,
matchAllTokens: true,
maxPatternLength: 24,
@@ -352,13 +351,13 @@
return function () {
clearTimeout(timeout);
timeout = setTimeout(function () {
- fn.apply(this, arguments)
+ fn.apply(this, arguments);
}, (wait || 150));
- }
};
+ }
Paginator(document.getElementsByClassName("list")[0]);
- search.addEventListener('keyup', debounce(filter, 200));
+ search.addEventListener('keyup', debounce(filter, 300));
]]>
</script>
<xsl:choose>