Skip to content

Commit 7bec639

Browse files
committed
Clean up demo and add comments to widget
1 parent 68d3140 commit 7bec639

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

demo/server.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ fastify.get("/cap-floating.js", (req, res) => {
2525

2626
fastify.post("/api/challenge", (req, res) => {
2727
res.send(
28-
cap.createChallenge({
29-
challengeCount: 32,
30-
challengeDifficulty: 3,
31-
})
28+
cap.createChallenge()
3229
);
3330
});
3431

widget/src/cap.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
});
2020
};
2121

22+
// MARK: Widget
2223
class CapWidget extends HTMLElement {
2324
#workerUrl = "";
2425
#resetTimer = null;
@@ -370,6 +371,7 @@
370371
}
371372
}
372373

374+
// MARK: Invisible
373375
class Cap {
374376
constructor(config = {}, el) {
375377
let widget = el || document.createElement("cap-widget");
@@ -410,6 +412,7 @@
410412
);
411413
document.adoptedStyleSheets.push(sheet);
412414

415+
// MARK: Solver worker
413416
const workerFunct = function () {
414417
let hasher;
415418

0 commit comments

Comments
 (0)