code: function cleanHeaders(e) {
    for (var headerIndex = 1; headerIndex < 7; headerIndex++) {
      var headers = e.getElementsByTagName('h' + headerIndex);
      for (var i = headers.length - 1; i >= 0; --i) {
        if (getClassWeight(headers[i]) < 0 || getLinkDensity(headers[i]) > 0.33) {
          headers[i].parentNode.removeChild(headers[i]);
        }
      }
    }
  }
docs: Clean out spurious headers from an Element. Checks things like classnames and link density.
  
  @param Element
  @return void