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

Commit

Permalink
Remove old distfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
omarreiss committed Oct 6, 2015
1 parent 676f62e commit 8353966
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 14 deletions.
52 changes: 51 additions & 1 deletion dist/yoast-seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ YoastSEO = ( "undefined" === typeof YoastSEO ) ? {} : YoastSEO;
*/
YoastSEO.App = function( args ) {
window.YoastSEO.app = this;
this.config = args;
this.config = this.extendConfig( args );
this.inputs = {};
this.rawData = args.callbacks.getData();
this.constructI18n( args.translations );
Expand All @@ -961,6 +961,56 @@ YoastSEO.App = function( args ) {
this.init();
};

/**
* Default config for YoastSEO.js
*
* @type {Object}
*/
YoastSEO.App.defaultConfig = {
sampleText: {
baseUrl: "example.org/",
snippetCite: "example-post/",
title: "This is an example title - edit by clicking here",
keyword: "Choose a focus keyword",
meta: "Modify your meta description by editing it right here",
text: "Start writing your text!"
}
};

/**
* Extend the config with defaults.
*
* @param {Object} args
* @returns {Object} args
*/
YoastSEO.App.prototype.extendConfig = function( args ) {
args.sampleText = this.extendSampleText( args.sampleText );

return args;
};

/**
* Extend sample text config with defaults.
*
* @param {Object} sampleText
* @returns {Object} sampleText
*/
YoastSEO.App.prototype.extendSampleText = function( sampleText ) {
var defaultSampleText = YoastSEO.App.defaultConfig.sampleText;

if ( sampleText === undefined ) {
sampleText = defaultSampleText;
} else {
for ( var key in sampleText ) {
if ( sampleText[ key ] === undefined ) {
sampleText[ key ] = defaultSampleText[ key ];
}
}
}

return sampleText;
};

/**
* Initializes i18n object based on passed configuration
*
Expand Down
4 changes: 2 additions & 2 deletions dist/yoast-seo.min.js

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions js/dist/yoast-seo-content-analysis.min.js

This file was deleted.

5 changes: 0 additions & 5 deletions js/dist/yoast-seo-content-analyzer.min.js

This file was deleted.

0 comments on commit 8353966

Please sign in to comment.