From 357bb405f56faf51cd1c9009a044500ce14e3e64 Mon Sep 17 00:00:00 2001 From: adityatelange Date: Tue, 15 Dec 2020 13:27:05 +0000 Subject: [PATCH] deploy: 9de41759138625e877ee3ca68880eba99af6eafb --- ...11a5bb7e851db3a0ea7771868a2a2a3dfe7d38385a4f65e8174d39.js} | 4 +++- l2/search/index.html | 2 +- search/index.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) rename assets/js/{search.min.77cec64bf046460a4a1942abf5fc7258ef1c7da95eae708792652423bdff92bc.js => search.min.39ad90917d11a5bb7e851db3a0ea7771868a2a2a3dfe7d38385a4f65e8174d39.js} (99%) diff --git a/assets/js/search.min.77cec64bf046460a4a1942abf5fc7258ef1c7da95eae708792652423bdff92bc.js b/assets/js/search.min.39ad90917d11a5bb7e851db3a0ea7771868a2a2a3dfe7d38385a4f65e8174d39.js similarity index 99% rename from assets/js/search.min.77cec64bf046460a4a1942abf5fc7258ef1c7da95eae708792652423bdff92bc.js rename to assets/js/search.min.39ad90917d11a5bb7e851db3a0ea7771868a2a2a3dfe7d38385a4f65e8174d39.js index 8c8d69f0..8e11f182 100644 --- a/assets/js/search.min.77cec64bf046460a4a1942abf5fc7258ef1c7da95eae708792652423bdff92bc.js +++ b/assets/js/search.min.39ad90917d11a5bb7e851db3a0ea7771868a2a2a3dfe7d38385a4f65e8174d39.js @@ -150,4 +150,6 @@ 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} »
  • `} \ No newline at end of file +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 diff --git a/l2/search/index.html b/l2/search/index.html index 1fd54b68..411c032b 100644 --- a/l2/search/index.html +++ b/l2/search/index.html @@ -1,4 +1,4 @@ -SearchL2 | PaperModL2