mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-09 16:57:30 +09:00
Update sync client for JS changes.
This commit is contained in:
parent
c53787dfdb
commit
ee948be1cf
54 changed files with 256 additions and 228 deletions
|
|
@ -10,10 +10,10 @@ this.EXPORTED_SYMBOLS = [
|
|||
"Collection",
|
||||
];
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cr = Components.results;
|
||||
const Cu = Components.utils;
|
||||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
var Cr = Components.results;
|
||||
var Cu = Components.utils;
|
||||
|
||||
const CRYPTO_COLLECTION = "crypto";
|
||||
const KEYS_WBO = "keys";
|
||||
|
|
@ -85,7 +85,7 @@ WBORecord.prototype = {
|
|||
toJSON: function toJSON() {
|
||||
// Copy fields from data to be stringified, making sure payload is a string
|
||||
let obj = {};
|
||||
for (let [key, val] in Iterator(this.data))
|
||||
for (let [key, val] of Object.entries(this.data))
|
||||
obj[key] = key == "payload" ? JSON.stringify(val) : val;
|
||||
if (this.ttl)
|
||||
obj.ttl = this.ttl;
|
||||
|
|
@ -309,7 +309,7 @@ CollectionKeyManager.prototype = {
|
|||
// Return a sorted, unique array.
|
||||
changed.sort();
|
||||
let last;
|
||||
changed = [x for each (x in changed) if ((x != last) && (last = x))];
|
||||
changed = changed.filter(x => (x != last) && (last = x));
|
||||
return {same: changed.length == 0,
|
||||
changed: changed};
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue