Skip to content

Commit 328020b

Browse files
committed
remove optional permission API
1 parent b657f18 commit 328020b

3 files changed

Lines changed: 9 additions & 30 deletions

File tree

app/elements/installing/install-confirm/install-confirm.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ namespace InstallConfirmElement {
293293
};
294294
if (permissions.indexOf(permission as _browser.permissions.Permission) === -1) {
295295
try {
296+
if (BrowserAPI.getBrowser() === 'chrome') {
297+
window.app.util.showToast(`Not asking for permission ${permission} as chrome does not allow it anymore. See issue #44 on github for more info`);
298+
return;
299+
}
296300
if (!(browserAPI.permissions)) {
297301
window.app.util.showToast(`Not asking for permission ${permission} as your browser does not support asking for permissions`);
298302
return;

app/elements/options/editpages/script-edit/script-edit.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,10 @@ namespace ScriptEditElement {
330330
window.app.util.showToast(`Not asking for permission ${permission} as your browser does not support asking for permissions`);
331331
return;
332332
}
333+
if (BrowserAPI.getBrowser() === 'chrome') {
334+
window.app.util.showToast(`Not asking for permission ${permission} as chrome does not allow it anymore. See issue #44 on github for more info`);
335+
return;
336+
}
333337

334338
browserAPI.permissions.request({
335339
permissions: [permission as _browser.permissions.Permission]

app/manifest.chrome.json

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -52,36 +52,7 @@
5252
],
5353

5454
"optional_permissions": [
55-
"alarms",
56-
"background",
57-
"bookmarks",
58-
"browsingData",
59-
"clipboardRead",
60-
"clipboardWrite",
61-
"contentSettings",
62-
"cookies",
63-
"declarativeContent",
64-
"desktopCapture",
65-
"downloads",
66-
"history",
67-
"identity",
68-
"idle",
69-
"management",
70-
"notifications",
71-
"pageCapture",
72-
"power",
73-
"printerProvider",
74-
"privacy",
75-
"sessions",
76-
"system.cpu",
77-
"system.memory",
78-
"system.storage",
79-
"topSites",
80-
"tabCapture",
81-
"tts",
82-
"webNavigation",
83-
"webRequest",
84-
"webRequestBlocking"
55+
"downloads"
8556
],
8657

8758
"commands": {

0 commit comments

Comments
 (0)