v1.5.0 修复报错日志
This commit is contained in:
parent
ed1fd2898c
commit
a8b0eada07
@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "渠道应用开发部知识库",
|
||||
"version": "1.3.3",
|
||||
"version": "1.5.0",
|
||||
"description": "通过关键词快速搜索内部文档",
|
||||
"permissions": ["storage"],
|
||||
"host_permissions": [
|
||||
|
||||
@ -3,18 +3,10 @@
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>加载中...</title>
|
||||
<script>
|
||||
chrome.storage.local.get(["token", "loginAt"], (res) => {
|
||||
const maxAge = 24 * 60 * 60 * 1000;
|
||||
const now = Date.now();
|
||||
const popup = (!res.token || !res.loginAt || (now - res.loginAt > maxAge))
|
||||
? "pages/login.html"
|
||||
: "pages/popup.html";
|
||||
window.location.href = chrome.runtime.getURL(popup);
|
||||
});
|
||||
</script>
|
||||
<link rel="stylesheet" href="styles.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div style="padding: 1rem; font-size: 14px;">正在加载,请稍候...</div>
|
||||
<script src="index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
8
pages/index.js
Normal file
8
pages/index.js
Normal file
@ -0,0 +1,8 @@
|
||||
chrome.storage.local.get(["token", "loginAt"], (res) => {
|
||||
const maxAge = 24 * 60 * 60 * 1000;
|
||||
const now = Date.now();
|
||||
const popup = (!res.token || !res.loginAt || (now - res.loginAt > maxAge))
|
||||
? "pages/login.html"
|
||||
: "pages/popup.html";
|
||||
window.location.href = chrome.runtime.getURL(popup);
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user