From 4c96b9842cd37c6107eab131dedb55e57c826ef7 Mon Sep 17 00:00:00 2001 From: adityatelange Date: Tue, 15 Dec 2020 13:29:03 +0000 Subject: [PATCH] deploy: 77ff1e6b452ad64eeee5178667827323d0a1644d --- ...46460a4a1942abf5fc7258ef1c7da95eae708792652423bdff92bc.js} | 4 +--- l2/search/index.html | 2 +- search/index.html | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) rename assets/js/{search.min.39ad90917d11a5bb7e851db3a0ea7771868a2a2a3dfe7d38385a4f65e8174d39.js => search.min.77cec64bf046460a4a1942abf5fc7258ef1c7da95eae708792652423bdff92bc.js} (99%) diff --git a/assets/js/search.min.39ad90917d11a5bb7e851db3a0ea7771868a2a2a3dfe7d38385a4f65e8174d39.js b/assets/js/search.min.77cec64bf046460a4a1942abf5fc7258ef1c7da95eae708792652423bdff92bc.js similarity index 99% rename from assets/js/search.min.39ad90917d11a5bb7e851db3a0ea7771868a2a2a3dfe7d38385a4f65e8174d39.js rename to assets/js/search.min.77cec64bf046460a4a1942abf5fc7258ef1c7da95eae708792652423bdff92bc.js index 8e11f182..8c8d69f0 100644 --- a/assets/js/search.min.39ad90917d11a5bb7e851db3a0ea7771868a2a2a3dfe7d38385a4f65e8174d39.js +++ b/assets/js/search.min.77cec64bf046460a4a1942abf5fc7258ef1c7da95eae708792652423bdff92bc.js @@ -150,6 +150,4 @@ Fuse.version='6.4.3';Fuse.createIndex=createIndex;Fuse.parseIndex=parseIndex;Fus return Fuse;})));;var fuse;function loadSearch(){var xhr=new XMLHttpRequest();xhr.onreadystatechange=function(){if(xhr.readyState===4){if(xhr.status===200){var data=JSON.parse(xhr.responseText);if(data){var options={isCaseSensitive:false,shouldSort:true,location:0,distance:100,threshold:0.4,minMatchCharLength:0,keys:['title','permalink','summary','content']};fuse=new Fuse(data,options);}}else{console.log(xhr.responseText);}}};xhr.open('GET',"../index.json");xhr.send();} document.getElementById("searchInput").onkeyup=function(e){const results=fuse.search(this.value);if(results.length!==0){let resultSet='';for(let item in results){resultSet=resultSet+itemGen(results[item].item.title,results[item].item.permalink)} document.getElementById("searchResults").innerHTML=resultSet;}else{document.getElementById("searchResults").innerHTML='';}} -function itemGen(name,link){return `
  • ${name} »
  • `} -function changeURL(url){if(history.replaceState){window.history.replaceState({path:url},'',url);}} -function getSearchQuery(){return decodeURIComponent((location.search.split('q=')[1]||'').split('&')[0]).replace(/\+/g,' ');} \ No newline at end of file +function itemGen(name,link){return `
  • ${name} »
  • `} \ No newline at end of file diff --git a/l2/search/index.html b/l2/search/index.html index 411c032b..1fd54b68 100644 --- a/l2/search/index.html +++ b/l2/search/index.html @@ -1,4 +1,4 @@ -SearchL2 | PaperModL2