mirror of
https://github.com/NikolaiT/se-scraper.git
synced 2024-11-22 07:33:07 +01:00
11 lines
313 B
JavaScript
11 lines
313 B
JavaScript
var nodeIterator = document.createNodeIterator(
|
|
document.body,
|
|
NodeFilter.SHOW_COMMENT,
|
|
{ acceptNode: function(node) { return NodeFilter.FILTER_ACCEPT; } }
|
|
);
|
|
|
|
// Remove all comment nodes
|
|
while(nodeIterator.nextNode()){
|
|
var commentNode = nodeIterator.referenceNode;
|
|
commentNode.remove();
|
|
} |