From 5a8ca32f3056cd38288cf4ffb8d5151606ec071c Mon Sep 17 00:00:00 2001 From: Jieiku Date: Tue, 31 May 2022 03:07:14 -0700 Subject: Search.js Fix unsafe-inline, Netlify Security Headers --- static/search.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static/search.min.js') diff --git a/static/search.min.js b/static/search.min.js index f6fb2eb..03847dc 100644 --- a/static/search.min.js +++ b/static/search.min.js @@ -1 +1 @@ -function closeSearch(){const e=document.querySelector("main");e.innerHTML=window.main}function goSearch(){const e=document.querySelector("main");window.main||(window.main=e.innerHTML);var t=document.getElementById("suggestions"),n=((ResultsClone=t.cloneNode(!0)).id="results",document.createElement("div")),o='
"),S=y[2]+y[0].length,40!==y[1]&&12<=y[0].length&&!/^[\x00-\xff]+$/.test(y[0])?(v=substringByByte(e.substring(y[2],S),12),m.push(v)):m.push(e.substring(y[2],S)),40===y[1]&&m.push("");return m.push("…"),m.join("")}(e.doc.body),suggestions.appendChild(n))});i.length>r;)suggestions.removeChild(i[0])},!0),suggestions.addEventListener("click",function(){for(;suggestions.lastChild;)suggestions.removeChild(suggestions.lastChild);return!1},!0)}(); +function closeSearchNow(){const e=document.querySelector("main");e.innerHTML=window.main}function goSearchNow(){const e=document.querySelector("main");window.main||(window.main=e.innerHTML);var t=document.getElementById("suggestions"),n=((ResultsClone=t.cloneNode(!0)).id="results",document.createElement("div")),o='
");return n.innerHTML=o,ResultsClone.insertBefore(n,ResultsClone.firstChild),e.innerHTML=ResultsClone.outerHTML,t.innerHTML="",document.getElementById("userinput").value="",!1}window.onload=function(){document.body.contains(document.goSearch)&&(document.goSearch.onsubmit=function(){return goSearchNow()}),document.body.contains(document.closeSearch)&&(document.closeSearch.onsubmit=function(){closeSearchNow()})},function(){function y(e){var t=new y.Index;return t.pipeline.add(y.trimmer,y.stopWordFilter,y.stemmer),e&&e.call(t,t),t}var a,c,e,t,d,h,f,p,g,m,v,S,x,w,b,I,E,F,D,C,k,_,N,P,n;y.version="0.9.5",((lunr=y).utils={}).warn=(n=this,function(e){n.console&&console.warn&&console.warn(e)}),y.utils.toString=function(e){return null==e?"":e.toString()},(y.EventEmitter=function(){this.events={}}).prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop();if("function"!=typeof t)throw new TypeError("last argument must be a function");e.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},y.EventEmitter.prototype.removeListener=function(e,t){this.hasHandler(e)&&-1!==(t=this.events[e].indexOf(t))&&(this.events[e].splice(t,1),0==this.events[e].length&&delete this.events[e])},y.EventEmitter.prototype.emit=function(e){var t;this.hasHandler(e)&&(t=Array.prototype.slice.call(arguments,1),this.events[e].forEach(function(e){e.apply(void 0,t)},this))},y.EventEmitter.prototype.hasHandler=function(e){return e in this.events},(y.tokenizer=function(e){return arguments.length&&null!=e?Array.isArray(e)?(t=(t=e.filter(function(e){return null!=e})).map(function(e){return y.utils.toString(e).toLowerCase()}),n=[],t.forEach(function(e){e=e.split(y.tokenizer.seperator),n=n.concat(e)},this),n):e.toString().trim().toLowerCase().split(y.tokenizer.seperator):[];var t,n}).defaultSeperator=/[\s\-]+/,y.tokenizer.seperator=y.tokenizer.defaultSeperator,y.tokenizer.setSeperator=function(e){null!=e&&"object"==typeof e&&(y.tokenizer.seperator=e)},y.tokenizer.resetSeperator=function(){y.tokenizer.seperator=y.tokenizer.defaultSeperator},y.tokenizer.getSeperator=function(){return y.tokenizer.seperator},(y.Pipeline=function(){this._queue=[]}).registeredFunctions={},y.Pipeline.registerFunction=function(e,t){t in y.Pipeline.registeredFunctions&&y.utils.warn("Overwriting existing registered function: "+t),e.label=t,y.Pipeline.registeredFunctions[t]=e},y.Pipeline.getRegisteredFunction=function(e){return e in y.Pipeline.registeredFunctions!=1?null:y.Pipeline.registeredFunctions[e]},y.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||y.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},y.Pipeline.load=function(e){var n=new y.Pipeline;return e.forEach(function(e){var t=y.Pipeline.getRegisteredFunction(e);if(!t)throw new Error("Cannot load un-registered function: "+e);n.add(t)}),n},y.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(e){y.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},y.Pipeline.prototype.after=function(e,t){if(y.Pipeline.warnIfFunctionNotRegistered(t),-1===(e=this._queue.indexOf(e)))throw new Error("Cannot find existingFn");this._queue.splice(e+1,0,t)},y.Pipeline.prototype.before=function(e,t){if(y.Pipeline.warnIfFunctionNotRegistered(t),-1===(e=this._queue.indexOf(e)))throw new Error("Cannot find existingFn");this._queue.splice(e,0,t)},y.Pipeline.prototype.remove=function(e){-1!==(e=this._queue.indexOf(e))&&this._queue.splice(e,1)},y.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,o=this._queue.length,i=0;i"),S=y[2]+y[0].length,40!==y[1]&&12<=y[0].length&&!/^[\x00-\xff]+$/.test(y[0])?(m=substringByByte(e.substring(y[2],S),12),v.push(m)):v.push(e.substring(y[2],S)),40===y[1]&&v.push("");return v.push("…"),v.join("")}(e.doc.body),suggestions.appendChild(n))});i.length>r;)suggestions.removeChild(i[0])},!0),suggestions.addEventListener("click",function(){for(;suggestions.lastChild;)suggestions.removeChild(suggestions.lastChild);return!1},!0)}(); \ No newline at end of file -- cgit v1.3.1