diff --git a/detector.js b/detector.js
index 794668c..2e53929 100644
--- a/detector.js
+++ b/detector.js
@@ -1,13 +1,10 @@
(function($) {
'use strict';
- $(document).ready(function() {
- console.log('detector');
var uhrCSSs = $('link[rel=stylesheet][href^=uhr-]');
+ var matcher = /^(.*)uhr-(.+).css$/;
for (var i = 0; i < uhrCSSs.length; i++) {
var name = $(uhrCSSs[i]).attr('href');
- var matcher = /^(.*)uhr-(.+).css$/;
var code = name.match(matcher)[2];
- console.log(name+": "+code);
+ window._uhr.themes.push(code);
}
- });
})(jQuery);
diff --git a/index.html b/index.html
index 8874c3b..6f42614 100644
--- a/index.html
+++ b/index.html
@@ -16,11 +16,6 @@ along with this program. If not, see .
Bärneruhr - Die Zeit im Wort
-
-
-
-
-
@@ -28,6 +23,11 @@ along with this program. If not, see .
+
+
+
+
+
diff --git a/uhr.js b/uhr.js
index 6982d62..325cbc8 100644
--- a/uhr.js
+++ b/uhr.js
@@ -21,7 +21,8 @@ along with this program. If not, see .
window._uhr = {
id: 0,
- languages: []
+ languages: [],
+ themes: []
};
$.widget("fritteli.uhr", {
options: {
@@ -222,12 +223,10 @@ along with this program. If not, see .
// theme chooser
var themeChooser = $('');
- themeChooser.append('');
- themeChooser.append('');
- themeChooser.append('');
- themeChooser.append('');
- themeChooser.append('');
- themeChooser.append('');
+ for (var i = 0; i < window._uhr.themes.length; i++) {
+ var theme = window._uhr.themes[i];
+ themeChooser.append('');
+ }
e.after(themeChooser);
}
},