2
0

WIP - upgrade to tmthrgd latest code.

This commit is contained in:
Maarten Billemont 2016-03-05 16:57:58 -05:00
parent b4da801bb0
commit f238bb723d
3 changed files with 11 additions and 6 deletions

View File

@ -8,9 +8,14 @@ if ((!window.crypto || !window.crypto.subtle) && window.SubtleCrypto)
// https://code.google.com/p/crypto-js/ // https://code.google.com/p/crypto-js/
if (!window.crypto || !window.crypto.subtle) { if (!window.crypto || !window.crypto.subtle) {
document.write("<script src=https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/hmac-sha256.js><\/script>"); document.write("<script src=https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/hmac-sha256.js><\/script>");
document.write("<script src=https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/pbkdf2.js><\/script>");
document.write("<script src=https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/components/lib-typedarrays-min.js><\/script>"); document.write("<script src=https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/components/lib-typedarrays-min.js><\/script>");
} }
if (!Number.MAX_SAFE_INTEGER) {
Number.MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
}
// If Typed Arrays are not supported we include the polyfill // If Typed Arrays are not supported we include the polyfill
// https://github.com/inexorabletash/polyfill // https://github.com/inexorabletash/polyfill
window.ArrayBuffer || document.write("<script src=js/typedarray-polyfill.js><\/script>"); window.ArrayBuffer || document.write("<script src=js/typedarray-polyfill.js><\/script>");
@ -40,7 +45,7 @@ try {
ES6 || document.write("<script src=js/mpw-js/traceur-runtime.js><\/script>"); ES6 || document.write("<script src=js/mpw-js/traceur-runtime.js><\/script>");
// Include the scrypt implementation // Include the scrypt implementation
var SCRYPTASM_PATH = (window.location + '').replace(/[^/]*(#[^#]*)?$/, 'js/mpw-js/scrypt-asm.js'); document.write("<script src=lib/" + esdir + "pbkdf2.js><\/script>");
document.write("<script src=js/mpw-js/" + esdir + "scrypt.js?1><\/script>"); document.write("<script src=js/mpw-js/" + esdir + "scrypt.js?1><\/script>");
// Include the MPW class // Include the MPW class

@ -1 +1 @@
Subproject commit 9566261e5d9815b5974683efc6648a751cfb4014 Subproject commit 5972a1c80f9bc721e79e5c218057143ade4acf68

View File

@ -195,9 +195,9 @@ window.setImmediate || !function (global) {
}; };
} }
// The worst fallback is setImmediate, although the delay is set to 0 // The worst fallback is setTimeout, although the delay is set to 0,
// in reality this should have a ~20ms delay, this is an important part // in reality this should have a ~20ms delay as this is an important
// of the spec // part of the spec
attachTo.setImmediate = (func, ...params) => global.setTimeout(func, 0, ...params); attachTo.setImmediate = (func, ...params) => global.setTimeout(func, 0, ...params);
attachTo.clearImmediate = global.clearTimeout; attachTo.clearImmediate = global.clearTimeout;
@ -208,4 +208,4 @@ window.setImmediate || !function (global) {
// the arguments // the arguments
arg || (attachTo.setImmediate = (func, ...params) => global.setTimeout(() => func(...params), 0)); arg || (attachTo.setImmediate = (func, ...params) => global.setTimeout(() => func(...params), 0));
}, 0, true); }, 0, true);
}(this); }(this || window);