mirror of
https://github.com/yaklang/yaklang-chrome-extension.git
synced 2026-09-26 21:21:53 +08:00
use indexedDB manager proxySwitch
This commit is contained in:
@@ -9,6 +9,18 @@ const websocketManager = new WebSocketManager();
|
||||
// 设置代理处理器
|
||||
setupProxyHandlers();
|
||||
|
||||
// 添加点击事件处理
|
||||
chrome.action.onClicked.addListener((tab) => {
|
||||
// 打开侧边栏
|
||||
chrome.sidePanel.open({ windowId: tab.windowId });
|
||||
});
|
||||
|
||||
// 可选:设置默认打开状态
|
||||
chrome.sidePanel.setOptions({
|
||||
enabled: true,
|
||||
path: 'index.html'
|
||||
});
|
||||
|
||||
chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) {
|
||||
console.log("msg", msg)
|
||||
switch (msg.action) {
|
||||
|
||||
Reference in New Issue
Block a user