mirror of
https://github.com/NikolaiT/se-scraper.git
synced 2024-11-24 16:43:20 +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();
|
|
} |