Skip to content
Browse files

changed in url theme check

  • Loading branch information...
1 parent 3d5046a commit b74d74097042a4f973c7d188cee89848a8778ca9 @pilu pilu committed Jan 21, 2009
Showing with 8 additions and 5 deletions.
  1. +8 −5 index.html
View
13 index.html
@@ -16,11 +16,14 @@
},
loadCurrent: function() {
- matches = window.location.hash.match(/^#themes\/([a-z0-9\-_]+)$/);
- if (matches && matches.length > 1) {
- $('#current-theme').attr('href', 'themes/' + matches[1] + '/style.css');
- } else {
- alert('theme not valid');
+ var hash = window.location.hash;
+ if (hash.length > 0) {
+ matches = hash.match(/^#themes\/([a-z0-9\-_]+)$/);
+ if (matches && matches.length > 1) {
+ $('#current-theme').attr('href', 'themes/' + matches[1] + '/style.css');
+ } else {
+ alert('theme not valid');
+ }
}
}
}

0 comments on commit b74d740

Please sign in to comment.
Something went wrong with that request. Please try again.