Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Commit

Permalink
include distfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
terw-dan committed Nov 6, 2015
1 parent 01c24da commit c1209c2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
20 changes: 16 additions & 4 deletions dist/yoast-seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2141,9 +2141,9 @@ YoastSEO.ScoreFormatter.prototype.outputOverallScore = function() {
var overallTarget = document.getElementById( this.overallTarget );

if ( overallTarget ) {
overallTarget.className = "overallScore " + this.scoreRating( Math.round( this.overallScore / 10 ) );
overallTarget.className = "overallScore " + this.overallScoreRating( Math.round( this.overallScore ) );
if ( this.keyword === "" ) {
overallTarget.className = "overallScore " + this.scoreRating( "na" );
overallTarget.className = "overallScore " + this.overallScoreRating( "na" );
}
}

Expand All @@ -2152,8 +2152,8 @@ YoastSEO.ScoreFormatter.prototype.outputOverallScore = function() {

/**
* Retuns a string that is used as a CSSclass, based on the numeric score or the NA string.
* @param score
* @returns scoreRate
* @param {number|string} score
* @returns {string} scoreRate
*/
YoastSEO.ScoreFormatter.prototype.scoreRating = function( score ) {
var scoreRate;
Expand All @@ -2174,6 +2174,18 @@ YoastSEO.ScoreFormatter.prototype.scoreRating = function( score ) {
}
return scoreRate;
};

/**
* Divides the total score by ten and calls the scoreRating function.
* @param {number|string} score
* @returns {string} scoreRate
*/
YoastSEO.ScoreFormatter.prototype.overallScoreRating = function( score ) {
if ( typeof score === "number" ) {
score = ( score / 10 );
}
return this.scoreRating( score );
};
;/* jshint browser: true */
/* global YoastSEO: true */
YoastSEO = ( "undefined" === typeof YoastSEO ) ? {} : YoastSEO;
Expand Down
Loading

0 comments on commit c1209c2

Please sign in to comment.