Skip to content

Commit

Permalink
Do not require allowing gitpod domain access
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptronicek committed Jan 4, 2024
1 parent 3c87335 commit 016f1f0
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 016f1f0

Please sign in to comment.