function(node) {
    node.readability = {"contentScore": 0};

    switch (node.tagName) {
      case 'DIV':
        node.readability.contentScore += 5;
        break;

      case 'PRE':
      case 'TD':
      case 'BLOCKQUOTE':
        node.readability.contentScore += 3;
        break;

      case 'ADDRESS':
      case 'OL':
      case 'UL':
      case 'DL':
      case 'DD':
      case 'DT':
      case 'LI':
      case 'FORM':
        node.readability.contentScore -= 3;
        break;

      case 'H1':
      case 'H2':
      case 'H3':
      case 'H4':
      case 'H5':
      case 'H6':
      case 'TH':
        node.readability.contentScore -= 5;
        break;
    }

    node.readability.contentScore += this._getClassWeight(node);
  }
function(node) {
    node.readability = {"contentScore": 0};

    switch (node.tagName) {
      case 'DIV':
        node.readability.contentScore += 5;
        break;

      case 'PRE':
      case 'TD':
      case 'BLOCKQUOTE':
        node.readability.contentScore += 3;
        break;

      case 'ADDRESS':
      case 'OL':
      case 'UL':
      case 'DL':
      case 'DD':
      case 'DT':
      case 'LI':
      case 'FORM':
        node.readability.contentScore -= 3;
        break;

      case 'H1':
      case 'H2':
      case 'H3':
      case 'H4':
      case 'H5':
      case 'H6':
      case 'TH':
        node.readability.contentScore -= 5;
        break;
    }

    node.readability.contentScore += this._getClassWeight(node);
  }
function ( node ) { node . readability = { "contentScore" : 0 } ; switch ( node . tagName ) { case 'DIV' : node . readability . contentScore += 5 ; break ; case 'PRE' : case 'TD' : case 'BLOCKQUOTE' : node . readability . contentScore += 3 ; break ; case 'ADDRESS' : case 'OL' : case 'UL' : case 'DL' : case 'DD' : case 'DT' : case 'LI' : case 'FORM' : node . readability . contentScore -= 3 ; break ; case 'H1' : case 'H2' : case 'H3' : case 'H4' : case 'H5' : case 'H6' : case 'TH' : node . readability . contentScore -= 5 ; break ; } node . readability . contentScore += this . _getClassWeight ( node ) ; }
Initialize a node with the readability object. Also checks the
className/id for special names to add to its score.

@param Element
@return void
Initialize a node with the readability object . Also checks the className / id for special names to add to its score .
Calculate the readability of a node