MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / openModal

Function openModal

popup/helpers/modal.js:24–37  ·  view source on GitHub ↗
(title, body)

Source from the content-addressed store, hash-verified

22}
23
24export function openModal(title, body) {
25 modalTitle.innerHTML = title;
26 if (typeof body === "string") {
27 modalBody.innerHTML = body;
28 } else if (typeof body === "object" && "nodeName" in body) {
29 modalBody.innerHTML = "";
30 modalBody.appendChild(body);
31 }
32 toggleModal(true);
33
34 return () => {
35 toggleModal(false);
36 };
37}
38
39(() => {
40 initModal();

Callers 3

createScriptButtonFunction · 0.90
runScriptFunction · 0.90
initSettingsFunction · 0.90

Calls 1

toggleModalFunction · 0.85

Tested by

no test coverage detected