Clipper/joplin-webclipper/content_scripts/Readability.js
function(nodeList, filterFn) {
    for (var i = nodeList.length - 1; i >= 0; i--) {
      var node = nodeList[i];
      var parentNode = node.parentNode;
      if (parentNode) {
        if (!filterFn || filterFn.call(this, node, i, nodeList)) {
          parentNode.removeChild(node);
        }
      }
    }
  }
function(nodeList, filterFn) {
    for (var i = nodeList.length - 1; i >= 0; i--) {
      var node = nodeList[i];
      var parentNode = node.parentNode;
      if (parentNode) {
        if (!filterFn || filterFn.call(this, node, i, nodeList)) {
          parentNode.removeChild(node);
        }
      }
    }
  }
function ( nodeList , filterFn ) { for ( var i = nodeList . length - 1 ; i >= 0 ; i -- ) { var node = nodeList [ i ] ; var parentNode = node . parentNode ; if ( parentNode ) { if ( ! filterFn || filterFn . call ( this , node , i , nodeList ) ) { parentNode . removeChild ( node ) ; } } } }
Iterates over a NodeList, calls `filterFn` for each node and removes node
if function returned `true`.

If function is not passed, removes all the nodes in node list.

@param NodeList nodeList The nodes to operate on
@param Function filterFn the function to use as a filter
@return void
Iterates over a NodeList calls filterFn for each node and removes node if function returned true .