mirror of
https://github.com/ItsVipra/ProToots
synced 2024-11-10 06:04:20 +00:00
fix permission requesting
This commit is contained in:
parent
371781ba7d
commit
85e77890e5
1 changed files with 1 additions and 6 deletions
|
@ -8,15 +8,10 @@ action.onClicked.addListener(async (tab) => {
|
|||
*/
|
||||
const u = new URL(tab.url);
|
||||
const perms = { origins: [`${u.origin}/*`] };
|
||||
const hasPermissions = await permissions.contains(perms);
|
||||
if (!hasPermissions) {
|
||||
await permissions.request(perms);
|
||||
}
|
||||
await permissions.request(perms);
|
||||
|
||||
action.setPopup({ popup: "options/options.html" });
|
||||
action.setTitle({ title: "Configure ProToots" });
|
||||
|
||||
await permissions.request(perms);
|
||||
await scripting.executeScript({
|
||||
files: ["content_scripts/protoots.js"],
|
||||
target: { tabId: tab.id },
|
||||
|
|
Loading…
Reference in a new issue