调整代码结构
This commit is contained in:
parent
a12727cee4
commit
607ea725f7
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
@ -5,9 +5,9 @@ chrome.runtime.onInstalled.addListener(() => {
|
|||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
|
|
||||||
if (!res.token || !res.loginAt || (now - res.loginAt > maxAge)) {
|
if (!res.token || !res.loginAt || (now - res.loginAt > maxAge)) {
|
||||||
chrome.action.setPopup({ popup: "login.html" });
|
chrome.action.setPopup({ popup: "./pages/login.html" });
|
||||||
} else {
|
} else {
|
||||||
chrome.action.setPopup({ popup: "popup.html" });
|
chrome.action.setPopup({ popup: "./pages/popup.html" });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -12,11 +12,11 @@
|
|||||||
"service_worker": "background.js"
|
"service_worker": "background.js"
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"default_popup": "login.html",
|
"default_popup": "./pages/login.html",
|
||||||
"default_icon": {
|
"default_icon": {
|
||||||
"16": "icon.png",
|
"16": "./assets/icon.png",
|
||||||
"48": "icon.png",
|
"48": "./assets/icon.png",
|
||||||
"128": "icon.png"
|
"128": "./assets/icon.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7,7 +7,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<img src="icon.png" alt="logo" class="logo" />
|
<img src="../assets/icon.png" alt="logo" class="logo" />
|
||||||
<h1>渠道应用开发部知识库</h1>
|
<h1>渠道应用开发部知识库</h1>
|
||||||
<a href="https://oa.ahrcu.com/sys/portal/page.jsp" target="_blank" class="oa-link">跳转OA</a>
|
<a href="https://oa.ahrcu.com/sys/portal/page.jsp" target="_blank" class="oa-link">跳转OA</a>
|
||||||
|
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<div class="history-wrapper hidden" id="historyWrapper">
|
<div class="history-wrapper hidden" id="historyWrapper">
|
||||||
<div class="history-header">
|
<div class="history-header">
|
||||||
<span>历史搜索:</span>
|
<span>历史搜索:</span>
|
||||||
<img id="clearHistoryBtn" src="delete.png" title="清空历史记录" class="delete-icon" />
|
<img id="clearHistoryBtn" src="../assets/delete.png" title="清空历史记录" class="delete-icon" />
|
||||||
</div>
|
</div>
|
||||||
<div id="historyTags" class="tag-history"></div>
|
<div id="historyTags" class="tag-history"></div>
|
||||||
</div>
|
</div>
|
||||||
Loading…
x
Reference in New Issue
Block a user