From e8095e3d3e5398c4da8170faf0b1ab168bb88b3a Mon Sep 17 00:00:00 2001 From: "bob.rao" Date: Tue, 25 Apr 2023 10:22:56 +0800 Subject: [PATCH] remove background.js --- background.js | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 background.js diff --git a/background.js b/background.js deleted file mode 100644 index 234da63..0000000 --- a/background.js +++ /dev/null @@ -1,16 +0,0 @@ -console.log('Sending checkedIndexes from background:', checkedIndexes); -chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { - chrome.tabs.sendMessage(tabs[0].id, { type: 'checkedIndexes', checkedIndexes: checkedIndexes }); -}); - -chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { - if (request.type === 'setCheckedIndexes') { - chrome.storage.local.set({ checkedIndexes: request.checkedIndexes }); - } else if (request.type === 'getCheckedIndexes') { - chrome.storage.local.get(['checkedIndexes'], (result) => { - sendResponse(result.checkedIndexes || []); - }); - return true; - } - }); - \ No newline at end of file