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

Commit

Permalink
No longer pass the complete callbacks object, but only the savescores…
Browse files Browse the repository at this point in the history
… function, since only this is used in the scoreFormatter.
  • Loading branch information
terw-dan committed Oct 5, 2015
1 parent 116bdfd commit 9473dce
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions dist/yoast-seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ YoastSEO.App.prototype.runAnalyzer = function() {
this.config.targets.output,
this.config.targets.overall,
this.rawData.keyword,
this.callbacks
this.callbacks.saveScores
);

if ( this.config.dynamicDelay ) {
Expand Down Expand Up @@ -2139,14 +2139,14 @@ YoastSEO = ( "undefined" === typeof YoastSEO ) ? {} : YoastSEO;
* @param {YoastSEO.App} args
* @constructor
*/
YoastSEO.ScoreFormatter = function( scores, overallScore, outputTarget, overallTarget, keyword, callbacks ) {
YoastSEO.ScoreFormatter = function( scores, overallScore, outputTarget, overallTarget, keyword, saveScores ) {
this.scores = scores;
this.overallScore = overallScore;
this.outputTarget = outputTarget;
this.overallTarget = overallTarget;
this.totalScore = 0;
this.keyword = keyword;
this.callbacks = callbacks;
this.saveScores = saveScores;
this.outputScore();
this.outputOverallScore();
};
Expand Down Expand Up @@ -2199,7 +2199,7 @@ YoastSEO.ScoreFormatter.prototype.outputOverallScore = function() {
if ( this.keyword === "" ) {
overallTarget.className = "overallScore " + this.scoreRating( "na" );
}
this.callbacks.saveScores( this.overallScore );
this.saveScores( this.overallScore );
};

/**
Expand Down
2 changes: 1 addition & 1 deletion dist/yoast-seo.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ YoastSEO.App.prototype.runAnalyzer = function() {
this.config.targets.output,
this.config.targets.overall,
this.rawData.keyword,
this.callbacks
this.callbacks.saveScores
);

if ( this.config.dynamicDelay ) {
Expand Down
6 changes: 3 additions & 3 deletions js/scoreFormatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ YoastSEO = ( "undefined" === typeof YoastSEO ) ? {} : YoastSEO;
* @param {YoastSEO.App} args
* @constructor
*/
YoastSEO.ScoreFormatter = function( scores, overallScore, outputTarget, overallTarget, keyword, callbacks ) {
YoastSEO.ScoreFormatter = function( scores, overallScore, outputTarget, overallTarget, keyword, saveScores ) {
this.scores = scores;
this.overallScore = overallScore;
this.outputTarget = outputTarget;
this.overallTarget = overallTarget;
this.totalScore = 0;
this.keyword = keyword;
this.callbacks = callbacks;
this.saveScores = saveScores;
this.outputScore();
this.outputOverallScore();
};
Expand Down Expand Up @@ -69,7 +69,7 @@ YoastSEO.ScoreFormatter.prototype.outputOverallScore = function() {
if ( this.keyword === "" ) {
overallTarget.className = "overallScore " + this.scoreRating( "na" );
}
this.callbacks.saveScores( this.overallScore );
this.saveScores( this.overallScore );
};

/**
Expand Down

0 comments on commit 9473dce

Please sign in to comment.