Closed fregante closed 3 months ago
The remove action currently doesn't work if the permission isn't exactly currentprotocol://currenthost.tld/*
remove
currentprotocol://currenthost.tld/*
https://github.com/fregante/webext-domain-permission-toggle/blob/ba697453ee5de2b8889aa2c76a2798d90addca16/index.ts#L61-L70
await chrome.permissions.request({origins: ["*://*.example.com/*"]}) await chrome.permissions.remove({origins: ["https://example.com/*"]})
The remove call will not do anything.
This also applies to <all_urls> and *://*/* granted via request()
<all_urls>
*://*/*
request()
The solution is to:
For step 1, I might have to add a new helper to webext-permissions, like
webext-permissions
findMatchingPermission( 'https://example.com/some/page', await chrome.permissions.getAll() ) // => "*://*.example.com/*" | undefined
The
remove
action currently doesn't work if the permission isn't exactlycurrentprotocol://currenthost.tld/*
https://github.com/fregante/webext-domain-permission-toggle/blob/ba697453ee5de2b8889aa2c76a2798d90addca16/index.ts#L61-L70
The
remove
call will not do anything.This also applies to
<all_urls>
and*://*/*
granted viarequest()
The solution is to:
For step 1, I might have to add a new helper to
webext-permissions
, like