mirror of
https://github.com/zadam/trilium.git
synced 2025-01-30 10:57:51 +08:00
cleaned up fuse.js which isn't used anymore
This commit is contained in:
parent
16eb7a0639
commit
566008baae
3 changed files with 0 additions and 36 deletions
|
@ -212,8 +212,6 @@
|
|||
|
||||
<script src="stat/lib/jquery.ui-contextmenu.min.js"></script>
|
||||
|
||||
<script src="stat/lib/fuse.min.js"></script>
|
||||
|
||||
<!-- https://github.com/ricmoo/aes-js -->
|
||||
<script src="stat/lib/aes.js"></script>
|
||||
<!-- 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
|
||||
$.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) {
|
||||
if (!terms) {
|
||||
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…
Reference in a new issue