Update 10 files

- /assets/js/jquery.pjax.min.js
- /assets/js/main.js
- /assets/js/pjax.js
- /_layouts/default.html
- /_layouts/post.html
- /_data/proxylist.yml
- /_data/other_repo_list.csv
- /Live2dHistoire/live2d/js/message.js
- /index.html
- /search.html
This commit is contained in:
mayx
2026-05-21 07:38:17 +00:00
parent 862bffac80
commit c4ae25dcb1
10 changed files with 519 additions and 104 deletions

View File

@@ -27,7 +27,7 @@ if (mykeyword) {
</script>
<script src="/assets/js/simple-jekyll-search.min.js"></script>
<script>
getSearchJSON(function(json){
function _doSearch(json) {
var sjs = SimpleJekyllSearch({
searchInput: sbox,
resultsContainer: document.getElementById('results-container'),
@@ -37,5 +37,22 @@ getSearchJSON(function(json){
});
sjs.search(mykeyword);
document.getElementById('search-loading').style.display = "none";
}
getSearchJSON(function(json) {
if (typeof SimpleJekyllSearch !== 'undefined') {
_doSearch(json);
} else {
// PJAX 场景:外部脚本通过 pjax 库异步加载,需要等待加载完成
var _poll = 0;
var _waitSJS = setInterval(function() {
if (typeof SimpleJekyllSearch !== 'undefined') {
clearInterval(_waitSJS);
_doSearch(json);
} else if (++_poll > 100) {
clearInterval(_waitSJS);
document.getElementById('search-loading').style.display = "none";
}
}, 50);
}
});
</script>