mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 11:49:19 +08:00
feat: 新增浏览器插件
This commit is contained in:
@@ -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;
|
||||
});
|
||||
Reference in New Issue
Block a user