From d878d83ee9277c6ac73a72cca305dccecfc49799 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Wed, 3 Apr 2024 16:38:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=8D=E5=8A=A0=E4=BF=AE=E6=94=B9=E4=BB=A5?= =?UTF-8?q?=E7=AC=A6=E5=90=88=20greasyfork=20=E7=9A=84=E7=A5=9E=E5=A5=87?= =?UTF-8?q?=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- u2_history.user.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/u2_history.user.js b/u2_history.user.js index df0c0a0..e103492 100644 --- a/u2_history.user.js +++ b/u2_history.user.js @@ -2,10 +2,11 @@ // @name 保存个人说明历史 // @namespace https://github.com/lifegpc/userscript // @version 0.0.1 -// @description 保存个人说明历史 +// @description 保存幼儿园个人说明历史 // @author lifegpc // @match https://u2.dmhy.org/usercp.php?action=personal* // @icon https://u2.dmhy.org/favicon.ico +// @license MIT // ==/UserScript== /**@type {IDBDatabase} */ let db = undefined; @@ -80,6 +81,7 @@ async function save_info(time, info) { return await db_handle(db => db.transaction('info', 'readwrite').objectStore('info').put({ time, info })); } async function render_page() {} +(async function() { let times = await get_all_info_keys(); let textarea = document.querySelector('textarea[name="info"]'); let submit = document.querySelector('input[type="submit"]'); @@ -222,3 +224,4 @@ submit.addEventListener('click', async () => { await save_info(new Date, info); } }) +})();