From 1b4fd0de9b6051d2edb1fb9d59399ecef7411024 Mon Sep 17 00:00:00 2001 From: mayx Date: Wed, 2 Apr 2025 18:17:34 +0000 Subject: [PATCH] Update 2 files - /js/main.js - /search.html --- js/main.js | 44 ++++++++++++++++++++++++++++++++++++++++++++ search.html | 5 ++--- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/js/main.js b/js/main.js index ad460a2..72c46a0 100644 --- a/js/main.js +++ b/js/main.js @@ -41,6 +41,50 @@ $(function () { } }); +$(function() { + function getQueryVariable(variable){ + var query = window.location.search.substring(1); + var vars = query.split("&"); + for (var i=0;i$1'); + $this.replaceWith(replaced); + } + } else if ( + this.nodeType === Node.ELEMENT_NODE && + !$(this).is('script, style, noscript, textarea') + ) { + highlightTextNodes(this); + } + }); + } + + $('section').each(function() { + highlightTextNodes(this); + }); +}); + today = new Date(); timeold = (today.getTime() - lastUpdated.getTime()); secondsold = Math.floor(timeold / 1000); diff --git a/search.html b/search.html index 1b01972..7f392cd 100644 --- a/search.html +++ b/search.html @@ -8,8 +8,7 @@ title: 搜索