PageSourceSearch

https://stash.run/js/meilisearch.min.js

js stash.run collected 2026-09-30 12:14:54 UTC 1,865 bytes, 1 lines download raw bytes

1let fetchUrl,token;const createHitsElement=(e,t,n)=>{const s=document.createElement("div"),a=document.createElement("h2"),o=document.createElement("a"),i=document.createElement("p");return s.classList.add("single-result-item"),i.classList.add("is-ellipsis-2"),o.innerHTML=e,i.innerHTML=n,o.href=t,a.appendChild(o),s.appendChild(a),s.appendChild(i),s},updateHitsDomElement=(e,t)=>{const n=document.getElementById(t);if(n.innerHTML="",e.length===0){const e=createHitsElement("No results","","No documentation matched your search.");n.appendChild(e)}else e.forEach(e=>{const t=createHitsElement(e.title,e.url,e.text);n.appendChild(t)})},showMeilisearchList=(e,t,n)=>{const o=e.target.value||"",s=o.trim();let i=document.getElementById(n);if(i.classList.remove("is-hidden"),s.length>0){const e={q:s,attributesToRetrieve:["title","url"],attributesToHighlight:["title","text"],attributesToCrop:["text"],cropLength:15,limit:7,offset:0};fetch(fetchUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${token}`},body:JSON.stringify(e)}).then(e=>e.json()).then(e=>{const n=e.hits,s=n.map(e=>e._formatted);updateHitsDomElement(s,t)}).catch(e=>{console.error(e)})}else{updateHitsDomElement([{title:"Searching",url:"",text:""}],t);let e=document.getElementById(n);e.classList.add("is-hidden")}},debounce=(e,t)=>{let n=null;return(...s)=>{window.clearTimeout(n),n=window.setTimeout(()=>{e.apply(null,s)},t)}},activate_search=(e,t,n,s,o)=>{updateHitsDomElement([{title:"Searching",url:"",text:""}],s);const i=document.getElementById(n);fetchUrl=`https://search.docs.appscode.com/indexes/${e}/search`,token=t,i.addEventListener("input",debounce(e=>showMeilisearchList(e,s,o),100)),$(document).on("click",function(e){$(e.target).closest(".ac-searchbar").length||(updateHitsDomElement([],s),i.value="",$(".search-result-box").addClass("is-hidden"))})}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.