This commit is contained in:
parent
d2205b11a7
commit
02b9aebbe5
341 changed files with 1571 additions and 32574 deletions
|
|
@ -6,7 +6,9 @@ interface ProcessOptions {
|
|||
}
|
||||
|
||||
const getHardwareConcurrency = () =>
|
||||
navigator.hardwareConcurrency !== undefined ? navigator.hardwareConcurrency : 1;
|
||||
navigator.hardwareConcurrency !== undefined
|
||||
? navigator.hardwareConcurrency
|
||||
: 1;
|
||||
|
||||
export default function process(
|
||||
options: ProcessOptions,
|
||||
|
|
@ -25,13 +27,16 @@ export default function process(
|
|||
workerMethod = "webcrypto";
|
||||
}
|
||||
|
||||
if (navigator.userAgent.includes("Firefox") || navigator.userAgent.includes("Goanna")) {
|
||||
if (
|
||||
navigator.userAgent.includes("Firefox") ||
|
||||
navigator.userAgent.includes("Goanna")
|
||||
) {
|
||||
console.log("Firefox detected, using pure-JS fallback");
|
||||
workerMethod = "purejs";
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
let webWorkerURL = `${options.basePrefix}/.within.website/x/cmd/anubis/static/js/worker/sha256-${workerMethod}.mjs?cacheBuster=${options.version}`;
|
||||
let webWorkerURL = `${options.basePrefix}/.within.website/x/cmd/nuke/static/js/worker/sha256-${workerMethod}.mjs?cacheBuster=${options.version}`;
|
||||
|
||||
const workers: Worker[] = [];
|
||||
let settled = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue