[nscl] Replaced lib/sha256.js with web platform native implementation (thanks Martin for suggested patch).
This commit is contained in:
parent
477eacab40
commit
1f7bbe48d9
|
@ -89,10 +89,10 @@ Messages.addHandler({
|
||||||
debug("COLLECT", list);
|
debug("COLLECT", list);
|
||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
store(event) {
|
async store(event) {
|
||||||
if (document.URL !== event.url) return;
|
if (document.URL !== event.url) return;
|
||||||
let {data} = event;
|
const {data} = event;
|
||||||
let attr = sha256(data.concat(Math.random()));
|
const attr = await sha256(data.concat(Math.random()));
|
||||||
document.documentElement.dataset[attr] = data;
|
document.documentElement.dataset[attr] = data;
|
||||||
return attr;
|
return attr;
|
||||||
},
|
},
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
"scripts": [
|
"scripts": [
|
||||||
"/nscl/lib/browser-polyfill.js",
|
"/nscl/lib/browser-polyfill.js",
|
||||||
"/nscl/lib/punycode.js",
|
"/nscl/lib/punycode.js",
|
||||||
"/nscl/lib/sha256.js",
|
"/nscl/common/sha256.js",
|
||||||
"/nscl/common/UA.js",
|
"/nscl/common/UA.js",
|
||||||
"/nscl/common/uuid.js",
|
"/nscl/common/uuid.js",
|
||||||
"/nscl/common/SyncMessage.js",
|
"/nscl/common/SyncMessage.js",
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
"all_frames": true,
|
"all_frames": true,
|
||||||
"js": [
|
"js": [
|
||||||
"/nscl/lib/browser-polyfill.js",
|
"/nscl/lib/browser-polyfill.js",
|
||||||
"/nscl/lib/sha256.js",
|
"/nscl/common/sha256.js",
|
||||||
"/nscl/common/UA.js",
|
"/nscl/common/UA.js",
|
||||||
"/nscl/common/uuid.js",
|
"/nscl/common/uuid.js",
|
||||||
"/nscl/common/log.js",
|
"/nscl/common/log.js",
|
||||||
|
|
2
src/nscl
2
src/nscl
|
@ -1 +1 @@
|
||||||
Subproject commit d85cc60cf297ad0012260975f3c1633279ddd012
|
Subproject commit 438bc9e3d2626521f8d669c32ddb0061fadcc4e5
|
Loading…
Reference in New Issue