diff --git a/src/components/AdvancedSettings.vue b/src/components/AdvancedSettings.vue index 40bf6f7d..6b253438 100644 --- a/src/components/AdvancedSettings.vue +++ b/src/components/AdvancedSettings.vue @@ -30,6 +30,21 @@ +
Only proceed if you know what you're doing. If enabled, the extension prompts once for permission to access and change data on all websites and never again. This is irreversible and has serious security implications
+The following objects represent the current data cached in local storage. This data is only available to Tusk, and is never sent over any network connection.
@@ -57,6 +72,13 @@ busy: false, expireTime: 2, hotkeyNavEnabled: false, + grantAllPermissions: false, + perms: { + origins: [ + "https://*/*", + "http://*/*" + ] + }, jsonState: [{ k: 'databaseUsages', // key f: this.settings.getSetDatabaseUsages, // getter @@ -124,6 +146,12 @@ }, hotkeyNavEnabled(newval, oldval) { this.settings.getSetHotkeyNavEnabled(newval) + }, + grantAllPermissions() { + chrome.runtime.sendMessage({ + m: "requestPermission", + perms: this.perms + }); } }, mounted() { @@ -133,6 +161,9 @@ this.settings.getSetHotkeyNavEnabled().then(val => { this.hotkeyNavEnabled = val; }) + chrome.permissions.contains(this.perms, granted => { + this.grantAllPermissions = !!granted; + }); this.jsonState.forEach(blob => { blob.f().then(result => { if (result && Object.keys(result).length) {