<p>
  <span>Test span</span>
  Text
</p>
More text
const removeAllTextNodes = () => {
  const treeWalker = document.createTreeWalker( document.body, NodeFilter.SHOW_TEXT);
  let currentNode = treeWalker.currentNode;

  while(currentNode) {
    currentNode.remove();
    currentNode = treeWalker.nextNode();
  }
}

setTimeout(removeAllTextNodes, 1000);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.