(new) parse style tags with type=text/less
This commit is contained in:
parent
ce76fc7630
commit
518fe12d1a
@ -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);
|
var startTime = endTime = new(Date);
|
||||||
|
|
||||||
less.refresh = function (reload) {
|
less.refresh = function (reload) {
|
||||||
|
Loading…
Reference in New Issue
Block a user