Compare commits

..

No commits in common. "fa8840d25ec52a96fddb0bf9f21c79d379f8b5cc" and "6638c722308b074de8c24ad80e66bd565bca41d8" have entirely different histories.

View File

@ -6,7 +6,7 @@ const TITLE = "title"
const SEARCH_TIMEOUT_MS = 100 const SEARCH_TIMEOUT_MS = 100
var SEARCH_TIMEOUT_ID = -1 var SEARCH_TIMEOUT_ID = -1
const fuse = new Fuse(search_data, { const fuse = new Fuse(data, {
keys: [ 'title' ], keys: [ 'title' ],
ignoreLocation: true, ignoreLocation: true,
threshhold: 0.4, threshhold: 0.4,
@ -30,7 +30,7 @@ function updateResults() {
console.log("updating results") console.log("updating results")
resultsDiv.innerHTML = '' resultsDiv.innerHTML = ''
if (searchBar.value) results = fuse.search(searchBar.value, { limit: RESULTS_MAX }).map(r => r.item) if (searchBar.value) results = fuse.search(searchBar.value, { limit: RESULTS_MAX }).map(r => r.item)
else results = search_data else results = data
results.forEach(r => { results.forEach(r => {
wrapper = document.createElement('li') wrapper = document.createElement('li')