Update 5 files

- /_data/other_repo_list.csv
- /index.html
- /_posts/2026-07-01-vibe-coding.md
- /assets/js/main_new.js
- /assets/js/main.js
This commit is contained in:
mayx
2026-06-30 16:00:55 +00:00
parent 772e3ed0b7
commit 7943cc7d6a
5 changed files with 137 additions and 289 deletions
+20
View File
@@ -17,6 +17,25 @@ function initVisitors() {
}
}
function highlightKeyword() {
var match = location.search.match(/[?&]kw=([^&]+)/);
var kw = match ? $.trim(decodeURIComponent(match[1].replace(/\+/g, ' '))) : '';
if (!kw) return;
var reg = new RegExp('(' + kw.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + ')', 'gi');
var escapeMap = { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' };
$('section, section *').not('script, style, textarea').contents().filter(function () {
return this.nodeType === 3;
}).each(function () {
var escapedText = this.nodeValue.replace(/[&<>"']/g, function (m) { return escapeMap[m]; });
var highlighted = escapedText.replace(reg, '<mark>$1</mark>');
if (escapedText !== highlighted) {
$(this).replaceWith(highlighted);
}
});
}
$(function () {
(function () {
var $backToTopTxt = "返回顶部", $backToTopEle = $('<div class="backToTop"></div>').appendTo($("body"))
@@ -42,6 +61,7 @@ $(function () {
});
console.warn("Mayx may already be Dead");
}
highlightKeyword();
});
function getSearchJSON(callback) {
-20
View File
@@ -1,22 +1,3 @@
function highlightKeyword() {
var match = location.search.match(/[?&]kw=([^&]+)/);
var kw = match ? $.trim(decodeURIComponent(match[1].replace(/\+/g, ' '))) : '';
if (!kw) return;
var reg = new RegExp('(' + kw.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + ')', 'gi');
var escapeMap = { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' };
$('section, section *').not('script, style, textarea').contents().filter(function() {
return this.nodeType === 3;
}).each(function() {
var escapedText = this.nodeValue.replace(/[&<>"']/g, function(m) { return escapeMap[m]; });
var highlighted = escapedText.replace(reg, '<mark>$1</mark>');
if (escapedText !== highlighted) {
$(this).replaceWith(highlighted);
}
});
}
function initCopyButtons() {
$('.copy').remove();
$('div.highlight').each(function () {
@@ -33,6 +14,5 @@ function initCopyButtons() {
}
$(function () {
highlightKeyword();
initCopyButtons();
});