MCPcopy
hub / github.com/github/awesome-copilot / ensureDivContent

Function ensureDivContent

website/src/scripts/modal.ts:208–225  ·  view source on GitHub ↗
(className: string)

Source from the content-addressed store, hash-verified

206}
207
208function ensureDivContent(className: string): HTMLDivElement | null {
209 let modalContent = getModalContent();
210 if (!modalContent) return null;
211
212 if (modalContent.tagName === "DIV") {
213 modalContent.className = className;
214 return modalContent as HTMLDivElement;
215 }
216
217 const modalBody = getModalBody();
218 if (!modalBody) return null;
219
220 const div = document.createElement("div");
221 div.id = "modal-content";
222 div.className = className;
223 modalBody.replaceChild(div, modalContent);
224 return div;
225}
226
227function renderPlainText(content: string): void {
228 const pre = ensurePreContent();

Callers 3

renderHighlightedCodeFunction · 0.85
renderCurrentFileContentFunction · 0.85
openCardDetailsModalFunction · 0.85

Calls 2

getModalContentFunction · 0.85
getModalBodyFunction · 0.85

Tested by

no test coverage detected