summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/anki-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/settings/anki-controller.js')
-rw-r--r--ext/bg/js/settings/anki-controller.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/ext/bg/js/settings/anki-controller.js b/ext/bg/js/settings/anki-controller.js
index e7c8db15..26abebeb 100644
--- a/ext/bg/js/settings/anki-controller.js
+++ b/ext/bg/js/settings/anki-controller.js
@@ -339,14 +339,7 @@ class AnkiController {
}
async _requestClipboardReadPermission() {
- const permissions = ['clipboardRead'];
-
- if (await new Promise((resolve) => chrome.permissions.contains({permissions}, resolve))) {
- // Already has permission
- return;
- }
-
- return await new Promise((resolve) => chrome.permissions.request({permissions}, resolve));
+ return await this._settingsController.setPermissionsGranted(['clipboardRead'], true);
}
_getFieldMarkers(fieldValue) {