docs: function(e, tag) {
      if (!this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY))
        return;
  
      var isList = tag === "ul" || tag === "ol";
  
      // Gather counts for other typical elements embedded within.
      // Traverse backwards so we can remove nodes at the same time
      // without effecting the traversal.
      //
      // TODO: Consider taking into account original contentScore here.
      this._removeNodes(e.getElementsByTagName(tag), function(node) {
        // First check if we're in a data table, in which case don't remove us.
        var isDataTable = function(t) {
          return t._readabilityDataTable;
        };
  
        if (this._hasAncestorTag(node, "table", -1, isDataTable)) {
          return false;
        }
  
        var weight = this._getClassWeight(node);
        var contentScore = 0;
  
        this.log("Cleaning Conditionally", node);
  
        if (weight + contentScore < 0) {
          return true;
        }
  
        if (this._getCharCount(node, ',') < 10) {
          // If there are not very many commas, and the number of
          // non-paragraph elements is more than paragraphs or other
          // ominous signs, remove the element.
          var p = node.getElementsByTagName("p").length;
          var img = node.getElementsByTagName("img").length;
          var li = node.getElementsByTagName("li").length - 100;
          var input = node.getElementsByTagName("input").length;
  
          var embedCount = 0;
          var embeds = node.getElementsByTagName("embed");
          for (var ei = 0, il = embeds.length; ei < il; ei += 1) {
            if (!this.REGEXPS.videos.test(embeds[ei].src))
              embedCount += 1;
          }
  
          var linkDensity = this._getLinkDensity(node);
          var contentLength = this._getInnerText(node).length;
  
          var haveToRemove =
            (img > 1 && p / img < 0.5 && !this._hasAncestorTag(node, "figure")) ||
            (!isList && li > p) ||
            (input > Math.floor(p/3)) ||
            (!isList && contentLength < 25 && (img === 0 || img > 2) && !this._hasAncestorTag(node, "figure")) ||
            (!isList && weight < 25 && linkDensity > 0.2) ||
            (weight >= 25 && linkDensity > 0.5) ||
            ((embedCount === 1 && contentLength < 75) || embedCount > 1);
          return haveToRemove;
        }
        return false;
      });
    }