Update from GitHub

Change-Id: I3af46eea6dd81f09710157db1f3a239c623cef6b
This commit is contained in:
Amir E. Aharoni
2012-10-11 12:21:33 +02:00
parent c3b26001d0
commit 9576538e21

View File

@@ -122,8 +122,7 @@
*/
parse: function() {
var that = this;
that.$element.find( '*[lang], [style], [class]' ).not( that.options.exclude ).each(
function( i, element ) {
that.$element.find( '*[lang], [style], [class]' ).each( function( i, element ) {
var fontFamilyStyle, fontFamily, $element = $( element );
fontFamilyStyle = $element.css( 'fontFamily' );
@@ -155,17 +154,19 @@
* @return Array font names array
*/
list: function( language ) {
var fontName = null, fontNames = [];
var fontName,
fontNames = [];
if ( language ) {
fontNames = this.repository.languages[language];
fontNames = this.repository.languages[language] || [];
} else {
for (fontName in this.repository.fonts) {
for ( fontName in this.repository.fonts ) {
if ( this.repository.fonts.hasOwnProperty( fontName ) ) {
fontNames.push( fontName );
}
}
}
return fontNames;
},
@@ -175,8 +176,10 @@
* @return Array language codes
*/
languages: function() {
var language = null, languages = [];
for (language in this.repository.languages) {
var language,
languages = [];
for ( language in this.repository.languages ) {
if ( this.repository.languages.hasOwnProperty( language ) ) {
languages.push( language );
}