@cap.js/widget 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cap.js +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cap.js/widget",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Cap widget",
5
5
  "keywords": [
6
6
  "captcha",
package/src/cap.js CHANGED
@@ -45,6 +45,7 @@
45
45
  }
46
46
 
47
47
  async solve() {
48
+ await until(() => !!this.#workerUrl);
48
49
  this.dispatchEvent("progress", { progress: 0 });
49
50
 
50
51
  try {
@@ -494,7 +495,7 @@
494
495
 
495
496
  setTimeout(async function () {
496
497
  workerScript =
497
- (await (await fetch("https://cdn.jsdelivr.net/gh/tiagorangel1/cap/lib/wasm-hashes.min.js")).text()) +
498
+ (await (await fetch("https://cdn.jsdelivr.net/npm/@cap.js/widget/wasm-hashes.min.js")).text()) +
498
499
  workerFunct
499
500
  .toString()
500
501
  .replace(/^function\s*\([^\)]*\)\s*{|\}$/g, "")