diff --git a/uhr.js b/uhr.js
index 1d00bbb..d842352 100644
--- a/uhr.js
+++ b/uhr.js
@@ -42,7 +42,7 @@ along with this program. If not, see .
width: '100%',
status: 'on',
language: 'de_CH',
- theme: 'black',
+ theme: window._uhr.themes[0].class,
force: false,
controls: true
},
@@ -225,22 +225,30 @@ along with this program. If not, see .
e.after(toggleSwitch);
// language chooser
- var languageChooser = $('');
+ var options = [];
for (var code in window._uhr.languages) {
if (window._uhr.languages.hasOwnProperty(code)) {
var language = window._uhr.languages[code];
- languageChooser.append('');
+ options.push('');
}
}
- e.after(languageChooser);
+ if (options.length > 1) {
+ var languageChooser = $('');
+ for (var i = 0; i < options.length; i++) {
+ languageChooser.append(options[i]);
+ }
+ e.after(languageChooser);
+ }
// theme chooser
- var themeChooser = $('');
- for (var i = 0; i < window._uhr.themes.length; i++) {
- var theme = window._uhr.themes[i];
- themeChooser.append('');
+ if (window._uhr.themes.length > 1) {
+ var themeChooser = $('');
+ for (var i = 0; i < window._uhr.themes.length; i++) {
+ var theme = window._uhr.themes[i];
+ themeChooser.append('');
+ }
+ e.after(themeChooser);
}
- e.after(themeChooser);
}
},
_wireFunctionality: function() {