diff --git a/html/options.html b/html/options.html index 40ef57f..1e9ce62 100644 --- a/html/options.html +++ b/html/options.html @@ -10,6 +10,7 @@ +
diff --git a/html/popup.html b/html/popup.html index d84884f..1fc7c56 100644 --- a/html/popup.html +++ b/html/popup.html @@ -10,6 +10,7 @@ + diff --git a/js/background.js b/js/background.js index eddaef0..3b28b04 100644 --- a/js/background.js +++ b/js/background.js @@ -113,11 +113,27 @@ function whitelistDomains(domains) { function updateTabIcon(tabId) { if (blockedTabs[tabId]) { - browser.browserAction.setIcon({tabId: tabId, path: "../img/icon_red_48.png"}); - browser.browserAction.setBadgeText({tabId: tabId, "text": "" + blockedTabs[tabId]}); + if (browser.browserAction.setIcon !== undefined) { + browser.browserAction.setIcon({tabId: tabId, path: "../img/icon_red_48.png"}); + browser.browserAction.setBadgeText({tabId: tabId, "text": "" + blockedTabs[tabId]}); + } + if (browser.browserAction.setTitle !== undefined ) { + browser.browserAction.setTitle({ + tabId: tabId, + title: browser.runtime.getManifest().name + " (BLOCKED)" + }); + } } else { - browser.browserAction.setIcon({tabId: tabId, path: "../img/icon_48.png"}); - browser.browserAction.setBadgeText({tabId: tabId, "text": ""}); + if (browser.browserAction.setIcon !== undefined) { + browser.browserAction.setIcon({tabId: tabId, path: "../img/icon_48.png"}); + browser.browserAction.setBadgeText({tabId: tabId, "text": ""}); + } + if (browser.browserAction.setTitle !== undefined ) { + browser.browserAction.setTitle({ + tabId: tabId, + title: browser.runtime.getManifest().name + }); + } } } diff --git a/manifest.json b/manifest.json index 45302c0..2e000e5 100644 --- a/manifest.json +++ b/manifest.json @@ -3,6 +3,7 @@ "version": "1.4", "manifest_version": 2, "icons": { + "48": "img/icon_48.png", "128": "img/icon_128.png", "512": "img/icon_512.png" }, @@ -26,7 +27,7 @@ ], "browser_action": { "default_title": "IDN Safe", - + "default_icon": "img/icon_48.png", "default_popup": "html/popup.html" }, "author": "Aykut Çevik"