mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-11 19:18:46 +00:00
@@ -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,7 +27,10 @@ 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";
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@ import fast from "./fast";
|
||||
export default {
|
||||
fast: fast,
|
||||
slow: fast, // XXX(Xe): slow is deprecated, but keep this around in case anything goes bad
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user