MCPcopy Create free account
hub / github.com/JKPotato-Computer/SignMaker / monitorControlText

Function monitorControlText

js/main.js:1738–1755  ·  view source on GitHub ↗
(i, p)

Source from the content-addressed store, hash-verified

1736 }
1737
1738 function monitorControlText(i, p) {
1739 function LineEditor(line) {
1740 if (line.includes("</>")) {
1741 line = line.split("</>");
1742 p.appendChild(document.createTextNode(line[0] + "⠀⠀⠀⠀⠀⠀⠀⠀⠀" + line[1]));
1743 } else if (line.includes("<-->")) {} else {
1744 p.appendChild(document.createTextNode(line));
1745 }
1746 }
1747
1748 const controlTextArray = i.controlText.split("\n");
1749 for (let lineNum = 0, length = controlTextArray.length - 1; lineNum < length; lineNum++) {
1750 LineEditor(controlTextArray[lineNum])
1751 p.appendChild(document.createElement("br"));
1752 }
1753
1754 LineEditor(controlTextArray[controlTextArray.length - 1]);
1755 }
1756
1757 const signCont = document.createElement("div");
1758 signCont.className = `signContainer ${panel.exitTabs[0].width.toLowerCase()}`;

Callers 1

redrawFunction · 0.85

Calls 1

LineEditorFunction · 0.70

Tested by

no test coverage detected