mirror of
https://github.com/obsqrbtz/goose-highlighter.git
synced 2026-04-08 20:19:06 +03:00
10 lines
338 B
JavaScript
10 lines
338 B
JavaScript
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);
|
|
});
|
|
}
|
|
}); |