MCPcopy Create free account
hub / github.com/OpenAnonymity/oa-chat / updateSwitchToggleUI

Method updateSwitchToggleUI

chat/components/ChatInput.js:1563–1570  ·  view source on GitHub ↗
(toggle, enabled, enabledTitle, disabledTitle)

Source from the content-addressed store, hash-verified

1561 } else {
1562 let prevSibling = deletedSpan.previousSibling;
1563 if (prevSibling?.nodeType === Node.TEXT_NODE) {
1564 nextRange.setStart(prevSibling, prevSibling.nodeValue?.length || 0);
1565 } else {
1566 const textNode = document.createTextNode('');
1567 deletedSpan.parentNode.insertBefore(textNode, deletedSpan);
1568 nextRange.setStart(textNode, textNode.nodeValue?.length || 0);
1569 }
1570 }
1571 nextRange.collapse(true);
1572 selection.removeAllRanges();
1573 selection.addRange(nextRange);

Callers 1

Calls 1

toggleMethod · 0.45

Tested by

no test coverage detected