From 016f1f072efcfb0dd25b0d8fb68cc90f81c9a1be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Tron=C3=AD=C4=8Dek?= Date: Thu, 4 Jan 2024 16:23:23 +0100 Subject: [PATCH] Do not require allowing gitpod domain access --- src/popup.tsx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/popup.tsx b/src/popup.tsx index 0e5b5fc..81b5c40 100644 --- a/src/popup.tsx +++ b/src/popup.tsx @@ -41,17 +41,12 @@ function IndexPopup() { const origin = hostToOrigin(parsedAddress); + storage.setItem(STORAGE_KEY_ADDRESS, parsedAddress) + .catch(e => { + setError(e.message); + }); + browser.permissions.request({ origins: [origin] }) - .then(granted => { - if (granted) { - storage.setItem(STORAGE_KEY_ADDRESS, parsedAddress) - .catch(e => { - setError(e.message); - }); - } else { - setError("Permission to access this origin was not granted. Please try again."); - } - }) .catch(e => { setError(e.message); });