aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-12-16 22:26:19 -0500
committerGitHub <noreply@github.com>2020-12-16 22:26:19 -0500
commitc3e772fadc8d0cba975284af774fc2266de44723 (patch)
treec7275d38a6dbf73e529f89fe50db95787cfcc2a4 /ext/bg/js
parent26dd0270d9e8667237b4875ffce4b0c5a6a42621 (diff)
Include permissions info in backup files (#1116)
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/settings/backup-controller.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/bg/js/settings/backup-controller.js b/ext/bg/js/settings/backup-controller.js
index 50a145ff..70ccd0e4 100644
--- a/ext/bg/js/settings/backup-controller.js
+++ b/ext/bg/js/settings/backup-controller.js
@@ -87,6 +87,7 @@ class BackupController {
const optionsFull = await this._settingsController.getOptionsFull();
const environment = await api.getEnvironmentInfo();
const fieldTemplatesDefault = await api.getDefaultAnkiFieldTemplates();
+ const permissions = await this._getPermissions();
// Format options
for (const {options} of optionsFull.profiles) {
@@ -102,6 +103,7 @@ class BackupController {
manifest: chrome.runtime.getManifest(),
environment,
userAgent: navigator.userAgent,
+ permissions,
options: optionsFull
};
@@ -165,6 +167,10 @@ class BackupController {
});
}
+ _getPermissions() {
+ return new Promise((resolve) => chrome.permissions.getAll(resolve));
+ }
+
// Importing
async _settingsImportSetOptionsFull(optionsFull) {