Simple fixes
This commit is contained in:
parent
5b0e5f51db
commit
6659b938b5
4 changed files with 10 additions and 26 deletions
|
|
@ -76,15 +76,6 @@ Compatibility._decrypt = function(base64, passphrase) {
|
|||
Compatibility._read = function(k, passphrase, cb) {
|
||||
preconditions.checkArgument(cb);
|
||||
|
||||
var localStorage;
|
||||
if (window.chrome && chrome.runtime && chrome.runtime.id) {
|
||||
console.log('Is a chrome app!..Compatibility.js');
|
||||
localStorage = chrome.storage.local;
|
||||
} else {
|
||||
console.log('Is web!');
|
||||
localStorage = window.localStorage;
|
||||
}
|
||||
|
||||
var ret = localStorage.getItem(k);
|
||||
if (!ret) return cb(null);
|
||||
var ret = self._decrypt(ret, passphrase);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue