Update package.json and code files

This commit is contained in:
n4ze3m
2024-02-04 13:56:25 +05:30
parent 5958e10354
commit a66d8a8418
9 changed files with 73 additions and 36 deletions

View File

@@ -1,6 +1,5 @@
export {}
chrome.runtime.onMessage.addListener(async (message) => {
if (message.type === "sidepanel") {
chrome.tabs.query({ active: true, currentWindow: true }, async (tabs) => {
@@ -11,3 +10,12 @@ chrome.runtime.onMessage.addListener(async (message) => {
})
}
})
chrome.action.onClicked.addListener((tab) => {
chrome.tabs.create({url: chrome.runtime.getURL("options.html")});
});
// listen to commadns
chrome.commands.onCommand.addListener((command) => {
console.log('Command', command)
})