2024-02-01 13:40:44 +05:30
|
|
|
export {}
|
|
|
|
|
|
|
|
|
|
chrome.runtime.onMessage.addListener(async (message) => {
|
2024-02-02 22:01:16 +05:30
|
|
|
if (message.type === "sidepanel") {
|
|
|
|
|
chrome.tabs.query({ active: true, currentWindow: true }, async (tabs) => {
|
|
|
|
|
const tab = tabs[0]
|
|
|
|
|
await chrome.sidePanel.open({
|
|
|
|
|
tabId: tab.id
|
|
|
|
|
})
|
2024-02-01 13:40:44 +05:30
|
|
|
})
|
2024-02-02 22:01:16 +05:30
|
|
|
}
|
2024-02-01 13:40:44 +05:30
|
|
|
})
|
2024-02-04 13:56:25 +05:30
|
|
|
|
|
|
|
|
chrome.action.onClicked.addListener((tab) => {
|
|
|
|
|
chrome.tabs.create({url: chrome.runtime.getURL("options.html")});
|
2024-02-07 00:11:07 +05:30
|
|
|
});
|