summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/clipboard-popups-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-30 15:05:08 -0500
committerGitHub <noreply@github.com>2021-01-30 15:05:08 -0500
commit828c4b11c14a13abe6ce352177ece341471e374f (patch)
treee08bd57aba64b95593dab87349127016df48c50f /ext/bg/js/settings/clipboard-popups-controller.js
parenta802666d8dde251d996fee66b4d96f69c044edf4 (diff)
Permissions requesting fixes (#1334)
* Fix permissions requests not occurring during user interaction * Update toggle after changing permissions * Update functions * Update clipboard requests
Diffstat (limited to 'ext/bg/js/settings/clipboard-popups-controller.js')
-rw-r--r--ext/bg/js/settings/clipboard-popups-controller.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/bg/js/settings/clipboard-popups-controller.js b/ext/bg/js/settings/clipboard-popups-controller.js
index ab1a8288..ec1d20ec 100644
--- a/ext/bg/js/settings/clipboard-popups-controller.js
+++ b/ext/bg/js/settings/clipboard-popups-controller.js
@@ -58,9 +58,7 @@ class ClipboardPopupsController {
let value = checkbox.checked;
if (value) {
- value = await new Promise((resolve) => {
- chrome.permissions.request({permissions: ['clipboardRead']}, resolve);
- });
+ value = await this._settingsController.setPermissionsGranted(['clipboardRead'], true);
checkbox.checked = value;
}