diff --git a/background.js b/background.js index 18833c0..6025102 100644 --- a/background.js +++ b/background.js @@ -1,5 +1,13 @@ let extensionStatus = 'on'; +chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { + if (tab.url.startsWith("chrome://")) { + // Set extension status to 'off' or prevent script injection + extensionStatus = 'off'; + chrome.action.setIcon({ path: "icons/off.png", tabId: tabId }); + } +}); + // Create context menus on installation chrome.runtime.onInstalled.addListener(() => { chrome.contextMenus.create({ @@ -350,7 +358,7 @@ function showHelpToast() { const overlay = document.createElement('div'); overlay.id = overlayId; - overlay.innerHTML = ``; + overlay.innerHTML = ``; overlay.style.cssText = 'position: fixed; bottom: 20px; right: 20px; z-index: 9999;'; document.body.appendChild(overlay); diff --git a/manifest.json b/manifest.json index 0c5bfca..7d52321 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,8 @@ "content_scripts": [ { "matches": [""], - "js": ["data/inject/rightclickmenu.js","data/inject/isolated.js", "data/inject/content.js", "data/inject/main.js"] + "exclude_matches": ["*://*.discord.com/*", "*://*.figma.com/*"], + "js": ["data/inject/rightclickmenu.js", "data/inject/isolated.js", "data/inject/content.js", "data/inject/main.js"] } ], "commands": {