Changes to the widget

This commit is contained in:
Tiago Rangel
2025-01-13 20:09:04 +00:00
parent 0617fa1d78
commit 20d01ff21d
2 changed files with 2 additions and 2 deletions
-1
View File
@@ -1,4 +1,3 @@
* Wait until wasm-hashes is loaded before solving
* Better error handling
* More options
* Add support for other languages
+2 -1
View File
@@ -45,6 +45,7 @@
}
async solve() {
await until(() => !!this.#workerUrl);
this.dispatchEvent("progress", { progress: 0 });
try {
@@ -494,7 +495,7 @@
setTimeout(async function () {
workerScript =
(await (await fetch("https://cdn.jsdelivr.net/gh/tiagorangel1/cap/lib/wasm-hashes.min.js")).text()) +
(await (await fetch("https://cdn.jsdelivr.net/npm/@cap.js/widget/wasm-hashes.min.js")).text()) +
workerFunct
.toString()
.replace(/^function\s*\([^\)]*\)\s*{|\}$/g, "")