first playground parsing the CSS names

This commit is contained in:
Manuel Friedli 2014-06-28 00:52:05 +02:00
parent 011e4cdf64
commit a72aacb504

13
detector.js Normal file
View file

@ -0,0 +1,13 @@
(function($) {
'use strict';
$(document).ready(function() {
console.log('detector');
var uhrCSSs = $('link[rel=stylesheet][href^=uhr-]');
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);
}
});
})(jQuery);