diff --git a/index.html b/index.html
index 6f42614..3a09367 100644
--- a/index.html
+++ b/index.html
@@ -27,7 +27,6 @@ along with this program. If not, see .
-
diff --git a/uhr.js b/uhr.js
index 325cbc8..a2f3110 100644
--- a/uhr.js
+++ b/uhr.js
@@ -24,6 +24,14 @@ along with this program. If not, see .
languages: [],
themes: []
};
+ // auto-detect themes
+ var uhrCSSs = $('head link[rel=stylesheet][href^=uhr-]');
+ var matcher = /^(.*)uhr-(.+).css$/;
+ for (var i = 0; i < uhrCSSs.length; i++) {
+ var name = $(uhrCSSs[i]).attr('href');
+ var code = name.match(matcher)[2];
+ window._uhr.themes.push(code);
+ }
$.widget("fritteli.uhr", {
options: {
width: '100%',