From 3c1e34af09cd8e6bc32638c27728e92f1d346689 Mon Sep 17 00:00:00 2001 From: Victor Savinov Date: Sun, 7 Nov 2021 15:01:32 +0300 Subject: [PATCH] Added Firefox support --- background.js | 13 +++++++++---- manifest.json | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/background.js b/background.js index 9ad316b..f4e8053 100644 --- a/background.js +++ b/background.js @@ -32,9 +32,14 @@ chrome.runtime.onMessage.addListener(async function (message, sender, sendRespon } if (message.action === 'get-tab-url') { - sendResponse({ - url: new URL(sender.tab.url).hostname, - id: sender.tab.id - }); + var response = { + url: new URL(sender.url || sender.tab.url).hostname, + id: sender.tab.id + }; + + sendResponse(response); + + return response; } + }); \ No newline at end of file diff --git a/manifest.json b/manifest.json index a16d210..29f6764 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Frame By Frame", "description": "__MSG_description__", - "version": "2.2.1", + "version": "2.2.2", "default_locale": "en", "icons": { "16": "icons/16.png",