From c25290e716e57c4e15e61df52c9a1e50d32415ff Mon Sep 17 00:00:00 2001
From: mayx
Date: Tue, 17 Jun 2025 03:56:14 +0000
Subject: [PATCH] Update 2 files
- /assets/js/simple-jekyll-search.min.js
- /search.html
---
assets/js/simple-jekyll-search.min.js | 52 ++++++++++++++++++++++++++-
search.html | 6 ++--
2 files changed, 53 insertions(+), 5 deletions(-)
diff --git a/assets/js/simple-jekyll-search.min.js b/assets/js/simple-jekyll-search.min.js
index 81df5d5..44745b0 100644
--- a/assets/js/simple-jekyll-search.min.js
+++ b/assets/js/simple-jekyll-search.min.js
@@ -3,4 +3,54 @@
* Copyright 2015-2020, Christian Fei
* Licensed under the MIT License.
*/
-!function(){"use strict";var f={compile:function(r){return i.template.replace(i.pattern,function(t,e){var n=i.middleware(e,r[e],i.template);return void 0!==n?n:r[e]||t})},setOptions:function(t){i.pattern=t.pattern||i.pattern,i.template=t.template||i.template,"function"==typeof t.middleware&&(i.middleware=t.middleware)}};const i={pattern:/\{(.*?)\}/g,template:"",middleware:function(){}};var n=function(t,e){var n=e.length,r=t.length;if(n{title}',templateMiddleware:Function.prototype,sortMiddleware:function(){return 0},noResultsText:"No results found",limit:10,fuzzy:!1,debounceTime:null,exclude:[]},n;const e=function(t,e){e?(clearTimeout(n),n=setTimeout(t,e)):t.call()};var r=["searchInput","resultsContainer","json"];const o=m({required:r});function u(t){d.put(t),i.searchInput.addEventListener("input",function(t){-1===[13,16,20,37,38,39,40,91].indexOf(t.which)&&(c(),e(function(){l(t.target.value)},i.debounceTime))})}function c(){i.resultsContainer.innerHTML=""}function s(t){i.resultsContainer.innerHTML+=t}function l(t){var e;(e=t)&&0>>0
+if("function"!=typeof t)throw new TypeError(t+" is not a function")
+for(arguments.length>1&&(r=e),n=0;o>n;){var u
+n in i&&(u=i[n],t.call(r,u,n,i)),n++}}),Array.prototype.filter||(Array.prototype.filter=function(t,e){if("Function"!=typeof t&&"function"!=typeof t||!this)throw new TypeError
+var r=this.length>>>0,n=Array(r),i=this,o=0,u=-1
+if(void 0===e)for(;++u!==r;)u in this&&t(i[u],u,i)&&(n[o++]=i[u])
+else for(;++u!==r;)u in this&&t.call(e,i[u],u,i)&&(n[o++]=i[u])
+return n.length=o,n}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var r
+if(null==this)throw new TypeError('"this" is null or not defined')
+var n=Object(this),i=n.length>>>0
+if(0===i)return-1
+var o=+e||0
+if(Math.abs(o)===1/0&&(o=0),o>=i)return-1
+for(r=Math.max(o>=0?o:i-Math.abs(o),0);i>r;){if(r in n&&n[r]===t)return r
+r++}return-1}),Object.prototype.toString||(Object.prototype.toString=function(){return"[object "+(this===window?"Window":this===document?"Document":"Object")+"]"}),function(){function t(t){j.pattern=t.pattern||j.pattern,j.template=t.template||j.template,"function"==typeof t.middleware&&(j.middleware=t.middleware)}function e(t){return j.template.replace(j.pattern,function(e,r){var n=j.middleware(r,t[r],j.template)
+return void 0!==n?n:t[r]||e})}function r(t,e){var r=e.length,n=t.length
+if(n>r)return!1
+if(n===r)return t===e
+t:for(var i=0,o=0;n>i;i++){for(var u=t.charCodeAt(i);r>o;)if(e.charCodeAt(o++)===u)continue t
+return!1}return!0}function n(){this.matches=function(t,e){return T(e.toLowerCase(),t.toLowerCase())}}function i(){this.matches=function(t,e){if(!t)return!1
+t=t.trim().toLowerCase(),e=e.trim().toLowerCase()
+for(var r=e.split(" "),n=!0,i=0;ir;r++)c(t[r])&&e.push(f(t[r]))
+return e}function p(t){return t?d(A,t,M.searchStrategy,M).sort(M.sort):[]}function h(t){M=t||{},M.fuzzy=t.fuzzy||!1,M.limit=t.limit||10,M.searchStrategy=t.fuzzy?x:E,M.sort=t.sort||o,M.exclude=t.exclude||[]}function d(t,e,r,n){for(var i=[],o=0;or;r++){var i=e[r]
+if(RegExp(i).test(t))return!0}return!1}function m(t,e){var r=g()
+r.open("GET",t,!0),r.onreadystatechange=w(r,e),r.send()}function w(t,e){return function(){if(4===t.readyState&&200===t.status)try{e(null,JSON.parse(t.responseText))}catch(r){e(r,null)}}}function g(){return window.XMLHttpRequest?new window.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")}function O(t,e){var r={}
+for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n],void 0!==e[n]&&(r[n]=e[n]))
+return r}function S(t){try{return t instanceof Object&&JSON.parse(JSON.stringify(t))?!0:!1}catch(e){return!1}}var b={compile:e,setOptions:t},j={}
+j.pattern=/\{(.*?)\}/g,j.template="",j.middleware=function(){}
+var T=r,x=new n,E=new i,z={put:u,clear:a,search:p,setOptions:h},A=[],M={}
+M.fuzzy=!1,M.limit=10,M.searchStrategy=M.fuzzy?x:E,M.sort=o,M.exclude=[]
+var L={load:m},q=function F(t){function e(t){return t?void 0!==t.required&&t.required instanceof Array:!1}if(!e(t))throw Error("-- OptionsValidator: required options missing")
+if(!(this instanceof F))return new F(t)
+var r=t.required
+this.getRequiredOptions=function(){return r},this.validate=function(t){for(var e=[],n=0;nn;n++)t[n].query=e,i(b.compile(t[n]))}function c(t){return t&&t.length>0}function s(t){for(var e=[13,16,20,37,38,39,40,91],r=0;r{title}',templateMiddleware:Function.prototype,sortMiddleware:function(){return 0},noResultsText:"No results found",limit:10,fuzzy:!1,debounceTime:null,exclude:[]},h=function(t,e){e?(clearTimeout(l),l=setTimeout(t,e)):t.call()},d=["searchInput","resultsContainer","json"],y=q({required:d})
+t.SimpleJekyllSearch=function(t){var n=y.validate(t)
+n.length>0&&f("You must specify the following required options: "+d),p=C.merge(p,t),b.setOptions({template:p.searchResultTemplate,middleware:p.templateMiddleware}),z.setOptions({fuzzy:p.fuzzy,limit:p.limit,sort:p.sortMiddleware,exclude:p.exclude}),C.isJSON(p.json)?e(p.json):r(p.json)
+var i={search:u}
+return"function"==typeof p.success&&p.success.call(i),i}}(window)}()
\ No newline at end of file
diff --git a/search.html b/search.html
index 651e8af..be69f4d 100644
--- a/search.html
+++ b/search.html
@@ -6,7 +6,7 @@ title: 搜索
搜索
+
-
-
\ No newline at end of file
+
\ No newline at end of file