import {App} from "/assets/App.js"; (async function () { $("#buttons").append(``); $("#restart-quagga").click(function () { if (confirm("Are you sure?")) { const self = $(this); self.prop("disabled", true); (async function () { try { alert(await App.RPC.__invoke("quagga::restart")); } finally { setTimeout(() => { self.prop("disabled", false); }, 5000); } })(); } }); })();