code: function getLinkDensity(e) {
    var links = e.getElementsByTagName("a");
  
    var textLength = getInnerText(e).length;
    var linkLength = 0;
    for (var i = 0, il = links.length; i < il; i++) {
      var href = links[i].getAttribute('href');
      // hack for <h2><a href="#menu"></a></h2> / <h2><a></a></h2>
      if (!href || (href.length > 0 && href[0] === '#')) continue;
      linkLength += getInnerText(links[i]).length;
    }
    return linkLength / textLength;
  }
docs: Get the density of links as a percentage of the content
  This is the amount of text that is inside a link divided by the total text in the node.
  
  @param Element
  @return number (float)