diff options
author | mayx | 2025-06-02 12:22:47 +0000 |
---|---|---|
committer | mayx | 2025-06-02 12:22:47 +0000 |
commit | 8fd0fd107fb8cae69404d38319cdd64b260b941c (patch) | |
tree | e6c34dbc2a33168a0a8fc78738d3ae81050ed819 /assets/js | |
parent | c2351bc2690c09fe600c00ea3804541a98af75a4 (diff) |
Update 3 files
- /_posts/2025-06-02-optimize.md - /assets/js/main.js - /index.html
Diffstat (limited to 'assets/js')
-rw-r--r-- | assets/js/main.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/assets/js/main.js b/assets/js/main.js index 7e56b3d..d0cc1c9 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -47,6 +47,10 @@ $(function () { }); function getSearchJSON(callback) { + if (typeof Storage == 'undefined') { + $.getJSON("/search.json", callback); + return; + } var searchData = JSON.parse(localStorage.getItem("blog_" + lastUpdated.valueOf())); if (!searchData) { for (var i = 0; i < localStorage.length; i++) { |