From 384fa9fdc9bcfc6034b7f1289fa6b50c20553fc6 Mon Sep 17 00:00:00 2001 From: FoxRefire <155989196+FoxRefire@users.noreply.github.com> Date: Mon, 9 Sep 2024 00:43:15 +0900 Subject: [PATCH] Fix for Android FF, not for normal user This is a change for developers, and it is recommended to use Kiwi Browser if you want to use this extension on your Android device. Issues regarding Firefox for Android will not be accepted unless there is a PR for the fix. --- background.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/background.js b/background.js index 2b9df2c..9bcc3b1 100644 --- a/background.js +++ b/background.js @@ -72,13 +72,17 @@ chrome.runtime.onMessage.addListener( ); } )() -chrome.browserAction.onClicked.addListener(function(tab) { - chrome.windows.create({ - url: "popup.html", - type: "popup", - width: 820, - height: 600 - }); +chrome.browserAction.onClicked.addListener(tab => { + if(chrome.windows){ + chrome.windows.create({ + url: "popup.html", + type: "popup", + width: 820, + height: 600 + }); + } else { + chrome.tabs.create({url: 'popup.html'}) + } }); function createMenu(){