Enable inline javascript in LESS
I need
.MakeRandom(@min: 0, @max: @min+1, @int: 0) {
.checkInt() {
@getNum: Math.random() * (@{max} - @{min} + @{int});
@base: unit(@{int}==1 ? Math.floor(@{getNum}) : @{getNum});
}
.checkInt();
@randNum: @base + @min;
}
@iconfont: 'icomoon'; @url: 'fonts/@{iconfont}/fonts/@{iconfont}';
@font-face { .MakeRandom(1, 99999, 1); font-family: @iconfont; src:url('@{url}.eot?@{randNum}'); src:url('@{url}.eot?@{randNum}#iefix') format('embedded-opentype'), url('@{url}.ttf?@{randNum}') format('truetype'), url('@{url}.woff?@{randNum}') format('woff'), url('@{url}.svg?@{randNum}#@{iconfont}') format('svg'); font-weight: normal; font-style: normal; }
SyntaxError: Inline JavaScript is not enabled. Is it set in your options?
I'm having the same issue, @haoss. Were you able to find any solutions? It seems this was disabled for security reasons in a certain build but I can't find any information on enabling it in the options.
Hi! No, but i use https://marketplace.visualstudio.com/items?itemName=mrcrowl.easy-less for Visual Studio Code. 99% the same
Thanks @haoss, unfortunately I'm using Sublime and for consistency my team would like to avoid using a different less compiler. @timdouglas Is this a setting we can change somewhere? It seems to be a new issue in the past couple months.