MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / waitForConfirm

Function waitForConfirm

rusense_flasher/js/flasher.js:40–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40function waitForConfirm() {
41 return new Promise((resolve) => {
42 const row = $("flash-confirm-row");
43 const btnYes = $("flash-confirm-yes");
44 const btnNo = $("flash-confirm-no");
45 row.hidden = false;
46 function cleanup(result) {
47 row.hidden = true;
48 btnYes.removeEventListener("click", onYes);
49 btnNo.removeEventListener("click", onNo);
50 resolve(result);
51 }
52 const onYes = () => cleanup(true);
53 const onNo = () => cleanup(false);
54 btnYes.addEventListener("click", onYes);
55 btnNo.addEventListener("click", onNo);
56 });
57}
58
59/* ── Main flash flow ── */
60window.flashDevice = async function (manifestPath) {

Callers 1

flasher.jsFile · 0.70

Calls 1

$Function · 0.70

Tested by

no test coverage detected