(new) parse style tags with type=text/less

This commit is contained in:
cloudhead 2010-07-01 11:08:52 +02:00
parent ce76fc7630
commit 518fe12d1a

View File

@ -72,6 +72,17 @@ for (var i = 0; i < links.length; i++) {
}
}
var styles = document.getElementsByTagName('style');
for (var i = 0; i < styles.length; i++) {
if (styles[i].type.match(typePattern)) {
new(less.Parser)().parse(styles[i].innerHTML || '', function (e, tree) {
styles[i].type = 'text/css';
styles[i].innerHTML = tree.toCSS();
});
}
}
var startTime = endTime = new(Date);
less.refresh = function (reload) {