mirror of
https://github.com/moparisthebest/mail
synced 2024-11-23 09:22:23 -05:00
update patch to openpgp.js
This commit is contained in:
parent
79c9d134d3
commit
c78860ebcf
@ -7433,9 +7433,10 @@ function openpgp_config() {
|
|||||||
*/
|
*/
|
||||||
function read() {
|
function read() {
|
||||||
var cf = null;
|
var cf = null;
|
||||||
if (typeof chrome === 'undefined' || typeof chrome.runtime === 'undefined') {
|
try {
|
||||||
cf = JSON.parse(window.localStorage.getItem("config"));
|
cf = JSON.parse(window.localStorage.getItem("config"));
|
||||||
}
|
} catch(e) {}
|
||||||
|
|
||||||
if (cf == null) {
|
if (cf == null) {
|
||||||
this.config = this.default_config;
|
this.config = this.default_config;
|
||||||
this.write();
|
this.write();
|
||||||
@ -7453,9 +7454,9 @@ function openpgp_config() {
|
|||||||
* Writes the config to HTML5 local storage
|
* Writes the config to HTML5 local storage
|
||||||
*/
|
*/
|
||||||
function write() {
|
function write() {
|
||||||
if (typeof chrome === 'undefined' || typeof chrome.runtime === 'undefined') {
|
try {
|
||||||
window.localStorage.setItem("config",JSON.stringify(this.config));
|
window.localStorage.setItem("config",JSON.stringify(this.config));
|
||||||
}
|
} catch(e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.read = read;
|
this.read = read;
|
||||||
@ -8469,10 +8470,10 @@ function openpgp_keyring() {
|
|||||||
*/
|
*/
|
||||||
function init() {
|
function init() {
|
||||||
var sprivatekeys, spublickeys;
|
var sprivatekeys, spublickeys;
|
||||||
if (typeof chrome === 'undefined' || typeof chrome.runtime === 'undefined') {
|
try {
|
||||||
sprivatekeys = JSON.parse(window.localStorage.getItem("privatekeys"));
|
sprivatekeys = JSON.parse(window.localStorage.getItem("privatekeys"));
|
||||||
spublickeys = JSON.parse(window.localStorage.getItem("publickeys"));
|
spublickeys = JSON.parse(window.localStorage.getItem("publickeys"));
|
||||||
}
|
} catch(e) {}
|
||||||
if (sprivatekeys == null || sprivatekeys.length == 0) {
|
if (sprivatekeys == null || sprivatekeys.length == 0) {
|
||||||
sprivatekeys = new Array();
|
sprivatekeys = new Array();
|
||||||
}
|
}
|
||||||
@ -8522,10 +8523,10 @@ function openpgp_keyring() {
|
|||||||
pub[i] = this.publicKeys[i].armored;
|
pub[i] = this.publicKeys[i].armored;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof chrome === 'undefined' || typeof chrome.runtime === 'undefined') {
|
try {
|
||||||
window.localStorage.setItem("privatekeys",JSON.stringify(priv));
|
window.localStorage.setItem("privatekeys",JSON.stringify(priv));
|
||||||
window.localStorage.setItem("publickeys",JSON.stringify(pub));
|
window.localStorage.setItem("publickeys",JSON.stringify(pub));
|
||||||
}
|
} catch(e) {}
|
||||||
}
|
}
|
||||||
this.store = store;
|
this.store = store;
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user