feat: 新增浏览器插件

This commit is contained in:
2026-08-16 16:45:24 +08:00
parent 2f32d955eb
commit f209d93733
38 changed files with 4727 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
/**
* Background Service Worker:生命周期与消息转发占位。
* 第一阶段业务请求由 Popup 直接发起;Content 由 Manifest 注入。
*/
chrome.runtime.onInstalled.addListener(() => {
console.info('[ecbi-extension] installed');
});
chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => {
if (message?.type === 'BACKGROUND_PING') {
sendResponse({ ok: true, data: { pong: true } });
return true;
}
return false;
});