1
0
مراية لـ https://github.com/Mabbs/mabbs.github.io تم المزامنة 2026-07-21 08:51:50 +00:00
- /_layouts/default.html
- /index.html
هذا الالتزام موجود في:
mayx
2025-03-30 13:47:42 +00:00
الأصل 9a0af3f555
التزام 7785bc18c7
2 ملفات معدلة مع 7 إضافات و2 حذوفات

عرض الملف

@@ -31,7 +31,12 @@
function getSearchJSON(callback) { function getSearchJSON(callback) {
var searchData = JSON.parse(localStorage.getItem("blog_" + lastUpdated.valueOf())); var searchData = JSON.parse(localStorage.getItem("blog_" + lastUpdated.valueOf()));
if (!searchData) { if (!searchData) {
localStorage.clear(); for (var i = 0; i < localStorage.length; i++) {
var key = localStorage.key(i);
if (key.startsWith('blog_')) {
localStorage.removeItem(key);
}
}
$.getJSON("/search.json", function (data) { $.getJSON("/search.json", function (data) {
localStorage.setItem("blog_" + lastUpdated.valueOf(), JSON.stringify(data)); localStorage.setItem("blog_" + lastUpdated.valueOf(), JSON.stringify(data));
callback(data); callback(data);

عرض الملف

@@ -3,7 +3,7 @@ layout: default
title: 首页 - 我的文章 title: 首页 - 我的文章
--- ---
<h1 style="display:inline"> 首页 - 我的文章 </h1><small><a href="/archives.html">Archives</a></small><br /><br /> <h1 style="display:inline"> 首页 - 我的文章 </h1><small><a href="/archives.html">Archives</a> | <a href="javascript:getSearchJSON(function(data){window.location.href = data[Math.floor(Math.random()*data.length)].url})">Random</a></small><br /><br />
<hr /> <hr />