mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Restore incognito check before storage
This commit is contained in:
parent
fc32cc8e33
commit
a5ee7f6c00
1 changed files with 7 additions and 0 deletions
|
@ -102,6 +102,13 @@ const state = new Proxy(overlay, {
|
|||
|
||||
// Persist "sets" to storage in the background for some keys
|
||||
if (PERSISTENT_KEYS.includes(property)) {
|
||||
// Ensure we don't accidentally store anything sensitive
|
||||
if (browser.extension.inIncognitoContext) {
|
||||
console.error(
|
||||
"Attempted to write to storage in private window.",
|
||||
)
|
||||
return false
|
||||
}
|
||||
browser.storage.local.set({
|
||||
state: R.pick(PERSISTENT_KEYS, target),
|
||||
} as any)
|
||||
|
|
Loading…
Add table
Reference in a new issue