Simplify by using native JavaScript instead of jQuery

Change-Id: I2ca5fbb21ac473f482579a944e5ab68c9374191c
This commit is contained in:
Fomafix
2018-09-01 08:57:17 +02:00
committed by jenkins-bot
parent 295527552f
commit 0fbdbc2c41
4 changed files with 15 additions and 23 deletions

View File

@@ -40,9 +40,9 @@
$langselector = $( 'select#language' );
function listFonts( fonts ) {
$.merge( fonts, [ 'Sans', 'Serif' ] );
fonts.push( 'Sans', 'Serif' );
$fontSelector.find( 'option' ).remove();
$.each( fonts, function ( key, font ) {
fonts.forEach( function ( font ) {
$fontSelector.append( $( "<option></option>" )
.attr( "value", font ).text( font ) );
} );
@@ -50,7 +50,7 @@
}
listFonts( fonts );
$.each( languages, function ( lang, language ) {
languages.forEach( function ( language ) {
$langselector.append( $( "<option></option>" )
.attr( 'value', language )
.text( language + " - " + $.uls.data.getAutonym( language ) ) );