Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I want to open this by saying I am sorry for not being thorough enough when implementing custom domains on Firefox. I misinterpreted the mdn page about
optional_permissions
for Firefox. Since Chrome hadhost_permissions
andoptional_host_permissions
, I thought, when I saw that Firefox supportshost_permissions
, that it also supportsoptional_host_permissions
and when I researched I didn't find that it [Firefox] did support it. It turns out Firefox accepts websites inoptional_permissions
.So this pull request allows us to remove all origins from the permissions on install time, and request them when needed.
Due to fact that Firefox could not detect requesting permissions from background script as being triggered from user action I found a way to remove the background script fully. Previously I had a problem not correctly detecting when a permission was granted and the way I found to fix it was through the background script. Now when I last changed the background script to allow multiple custom domains to be registered, it now allowed me to move the whole logic in the settings popup.
On Firefox there was a warning in the devtools that it was running in quirks mode, whatever that is, and it suggested to add
<DOCTYPE html
to the html, so I did and the warning is no more.Closes #99 and #36 (comment)