added options argument 'index'
This commit is contained in:
parent
1d715995ff
commit
adc9f59adc
1 changed files with 6 additions and 1 deletions
|
@ -113,7 +113,12 @@ function parseRequest(data) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (data.index != undefined) {
|
if (data.index != undefined) {
|
||||||
blinkstickConfig.options.index = data.index;
|
blinkstickConfig.options.index = parseInt(data.index);
|
||||||
|
if (blinkstickConfig.options.index < 0) {
|
||||||
|
blinkstickConfig.options.index = 0;
|
||||||
|
} else if (blinkstickConfig.options.index > 7) {
|
||||||
|
blinkstickConfig.options.index = 7;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (blinkstickConfig.options.duration < 100) {
|
if (blinkstickConfig.options.duration < 100) {
|
||||||
blinkstickConfig.options.duration = 100;
|
blinkstickConfig.options.duration = 100;
|
||||||
|
|
Loading…
Reference in a new issue