diff --git a/background.js b/background.js index 99db3b2..ce0bd02 100644 --- a/background.js +++ b/background.js @@ -1,13 +1,13 @@ -// 仅在插件安装时设置默认 popup 页面,不再在 startup 中干扰当前 UI -chrome.runtime.onInstalled.addListener(() => { - chrome.storage.local.get(["token", "loginAt"], (res) => { - const maxAge = 24 * 60 * 60 * 1000; // 1天有效期 - const now = Date.now(); - - if (!res.token || !res.loginAt || (now - res.loginAt > maxAge)) { - chrome.action.setPopup({ popup: "./pages/login.html" }); - } else { - chrome.action.setPopup({ popup: "./pages/popup.html" }); - } - }); -}); +// // 仅在插件安装时设置默认 popup 页面,不再在 startup 中干扰当前 UI +// chrome.runtime.onInstalled.addListener(() => { +// chrome.storage.local.get(["token", "loginAt"], (res) => { +// const maxAge = 24 * 60 * 60 * 1000; // 1天有效期 +// const now = Date.now(); +// +// if (!res.token || !res.loginAt || (now - res.loginAt > maxAge)) { +// chrome.action.setPopup({ popup: "./pages/login.html" }); +// } else { +// chrome.action.setPopup({ popup: "./pages/popup.html" }); +// } +// }); +// }); diff --git a/manifest.json b/manifest.json index f5d4cb1..cea2096 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "渠道应用开发部知识库", - "version": "2.0.0", + "version": "2.0.1", "description": "通过关键词快速搜索内部文档", "permissions": ["storage"], "host_permissions": [ diff --git a/pages/index.html b/pages/index.html index eeaeb0e..70c2d00 100644 --- a/pages/index.html +++ b/pages/index.html @@ -9,6 +9,8 @@