diff --git a/background.js b/background.js index b00d997..3a3e3e7 100644 --- a/background.js +++ b/background.js @@ -30,10 +30,18 @@ const fetchPath = (pathname) => (url) => { * @returns {number} Tab number. */ const setIcon = (tabId) => (path) => { - api.action.setIcon({ - path: path, - tabId, - }); + if (!api.pageAction) { + // Chrome doesn't support page actions + api.action.setIcon({ + path: path, + tabId, + }); + } else { + api.pageAction.setIcon({ + path: path, + tabId, + }); + } return tabId; }; diff --git a/manifest/manifest_chrome.json b/manifest/manifest_chrome.json index c399497..7e4d347 100644 --- a/manifest/manifest_chrome.json +++ b/manifest/manifest_chrome.json @@ -1,7 +1,15 @@ { + "author": { + "email": "janchristoph.ebersbach@gmail.com" + }, "background": { "service_worker": "background.js", "type": "module" }, - "minimum_chrome_version": "92" + "minimum_chrome_version": "92", + "action": { + "default_title": "identinet Decentralized Identity Information", + "default_popup": "index.html", + "default_icon": "icons/favicon_48.png" + } } diff --git a/manifest/manifest_firefox.json b/manifest/manifest_firefox.json index dc05b04..ee7db96 100644 --- a/manifest/manifest_firefox.json +++ b/manifest/manifest_firefox.json @@ -7,5 +7,14 @@ "id": "extension@identinet.io", "strict_min_version": "109.0" } + }, + "page_action": { + "default_title": "identinet Decentralized Identity Information", + "default_popup": "index.html", + "default_icon": { + "19": "icons/favicon_19.png", + "38": "icons/favicon_38.png" + }, + "show_matches": ["https://*/*"] } } diff --git a/manifest/manifest_shared.json b/manifest/manifest_shared.json index 26cdf71..7836778 100644 --- a/manifest/manifest_shared.json +++ b/manifest/manifest_shared.json @@ -11,11 +11,6 @@ "96": "icons/favicon_96.png", "128": "icons/favicon_128.png" }, - "action": { - "default_title": "identinet Decentralized Identity Information", - "default_popup": "index.html", - "default_icon": "icons/favicon_48.png" - }, "permissions": [ "activeTab", "tabs", diff --git a/public/icons/favicon_19.png b/public/icons/favicon_19.png new file mode 100644 index 0000000..35dbeca Binary files /dev/null and b/public/icons/favicon_19.png differ diff --git a/public/icons/favicon_38.png b/public/icons/favicon_38.png new file mode 100644 index 0000000..9d86642 Binary files /dev/null and b/public/icons/favicon_38.png differ