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