mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
cleaned up fuse.js which isn't used anymore
This commit is contained in:
parent
16eb7a0639
commit
566008baae
@ -212,8 +212,6 @@
|
|||||||
|
|
||||||
<script src="stat/lib/jquery.ui-contextmenu.min.js"></script>
|
<script src="stat/lib/jquery.ui-contextmenu.min.js"></script>
|
||||||
|
|
||||||
<script src="stat/lib/fuse.min.js"></script>
|
|
||||||
|
|
||||||
<!-- https://github.com/ricmoo/aes-js -->
|
<!-- https://github.com/ricmoo/aes-js -->
|
||||||
<script src="stat/lib/aes.js"></script>
|
<script src="stat/lib/aes.js"></script>
|
||||||
<!-- https://github.com/emn178/js-sha256 -->
|
<!-- https://github.com/emn178/js-sha256 -->
|
||||||
|
@ -30,31 +30,6 @@ $(window).on('beforeunload', function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Overrides the default autocomplete filter function to search for matched on atleast 1 word in each of the input term's words
|
// Overrides the default autocomplete filter function to search for matched on atleast 1 word in each of the input term's words
|
||||||
$.ui.autocomplete.filter = function (array, terms) {
|
|
||||||
const options = {
|
|
||||||
shouldSort: true,
|
|
||||||
threshold: 0.6,
|
|
||||||
location: 0,
|
|
||||||
distance: 100,
|
|
||||||
maxPatternLength: 32,
|
|
||||||
minMatchCharLength: 1,
|
|
||||||
keys: [
|
|
||||||
"value"
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const startDate = new Date();
|
|
||||||
|
|
||||||
const fuse = new Fuse(array, options); // "list" is the item array
|
|
||||||
|
|
||||||
const results = fuse.search(terms);
|
|
||||||
|
|
||||||
console.log("Search took " + (new Date().getTime() - startDate.getTime()) + "ms");
|
|
||||||
|
|
||||||
return results;
|
|
||||||
};
|
|
||||||
|
|
||||||
$.ui.autocomplete.filter = function (array, terms) {
|
$.ui.autocomplete.filter = function (array, terms) {
|
||||||
if (!terms) {
|
if (!terms) {
|
||||||
return [];
|
return [];
|
||||||
|
9
static/lib/fuse.min.js
vendored
9
static/lib/fuse.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user