From df8c7589d73b0e791ea2ed2c3e1b2c5d07c2e834 Mon Sep 17 00:00:00 2001
From: j m <1406993111@qq.com>
Date: Sun, 4 Aug 2024 06:59:36 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=90=9C=E7=B4=A2=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/js/search.js | 2 +-
templates/assets/js/search.min.js | 2 +-
theme.yaml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/js/search.js b/src/js/search.js
index ba96452..bb16eed 100644
--- a/src/js/search.js
+++ b/src/js/search.js
@@ -88,4 +88,4 @@ $(function () {
var event = new Event('input', {bubbles: true})
searchInput.dispatchEvent(event)
}
-})()
\ No newline at end of file
+})
\ No newline at end of file
diff --git a/templates/assets/js/search.min.js b/templates/assets/js/search.min.js
index 908406e..dbf8a35 100644
--- a/templates/assets/js/search.min.js
+++ b/templates/assets/js/search.min.js
@@ -1 +1 @@
-$(function(){var e,t=document.getElementById("dream-search-form"),a=DreamConfig.search_target,n=document.getElementById("halo-search-form-text-input"),i=$("#dream-search-result"),r=$("#dream-search-result-empty");function s(e){return e.replace(/<(?!(?:mark\b[^<>]*)<\/mark>|mark\b)[^<>]*>/gi,"")}function c(e){if(!e)return i.empty(),r.show();Utils.request({url:"/apis/api.halo.run/v1alpha1/indices/post",contentType:"application/json;charset=UTF-8",returnRaw:!0,data:{keyword:e,limit:$("#halo-search-form-limit").val(),highlightPreTag:"",highlightPostTag:""}}).then(e=>{if(console.log(e),0\n\n
\n'+s(n.title)+'
\n\n
\n'+s(n.description)+'\n
\n
\n
\n
\n')}}else r.show(),i.empty()}).catch(e=>{})}t.addEventListener("submit",function(e){e.preventDefault(),c(n.value)}),document.addEventListener("keydown",function(e){"Enter"===e.key&&t.contains(document.activeElement)&&(e.preventDefault(),c(n.value))}),n.addEventListener("input",function(e){c(e.target.value)}),function(e,t=window.location.href){e="keyword".replace(/[\[\]]/g,"\\$&");e=new RegExp("[?&]"+e+"(=([^]*)|&|#|$)").exec(t);return e&&e[2]&&decodeURIComponent(e[2].replace(/\+/g," "))}()&&(e=new Event("input",{bubbles:!0}),n.dispatchEvent(e))})();
\ No newline at end of file
+$(function(){var e,t=document.getElementById("dream-search-form"),a=DreamConfig.search_target,n=document.getElementById("halo-search-form-text-input"),i=$("#dream-search-result"),r=$("#dream-search-result-empty");function s(e){return e.replace(/<(?!(?:mark\b[^<>]*)<\/mark>|mark\b)[^<>]*>/gi,"")}function c(e){if(!e)return i.empty(),r.show();Utils.request({url:"/apis/api.halo.run/v1alpha1/indices/post",contentType:"application/json;charset=UTF-8",returnRaw:!0,data:{keyword:e,limit:$("#halo-search-form-limit").val(),highlightPreTag:"",highlightPostTag:""}}).then(e=>{if(console.log(e),0\n\n
\n'+s(n.title)+'
\n\n
\n'+s(n.description)+'\n
\n
\n
\n
\n')}}else r.show(),i.empty()}).catch(e=>{})}t.addEventListener("submit",function(e){e.preventDefault(),c(n.value)}),document.addEventListener("keydown",function(e){"Enter"===e.key&&t.contains(document.activeElement)&&(e.preventDefault(),c(n.value))}),n.addEventListener("input",function(e){c(e.target.value)}),function(e,t=window.location.href){e="keyword".replace(/[\[\]]/g,"\\$&");e=new RegExp("[?&]"+e+"(=([^]*)|&|#|$)").exec(t);return e&&e[2]&&decodeURIComponent(e[2].replace(/\+/g," "))}()&&(e=new Event("input",{bubbles:!0}),n.dispatchEvent(e))});
\ No newline at end of file
diff --git a/theme.yaml b/theme.yaml
index f07cc69..70c174a 100644
--- a/theme.yaml
+++ b/theme.yaml
@@ -30,7 +30,7 @@ spec:
settingName: theme-dream2-plus-setting
configMapName: theme-dream2-plus-configMap
# 版本号
- version: 1.2.7.beta3
+ version: 1.2.7.beta4
# 最低支持的 Halo 版本
require: ">=2.15.0"
# 许可