chore: remove content script and update manifest for service worker

This commit is contained in:
2025-06-23 14:25:21 +03:00
parent 28e6b933c7
commit e34c6637f1
3 changed files with 17 additions and 11 deletions

10
background.js Normal file
View File

@@ -0,0 +1,10 @@
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
if (changeInfo.status === "complete" && /^https?:/.test(tab.url)) {
chrome.scripting.executeScript({
target: { tabId },
files: ["main.js"]
}).catch(err => {
console.warn("Injection failed:", err);
});
}
});