Minor JS optimisation.

This commit is contained in:
Blaz Kristan 2022-02-27 11:31:30 +01:00
parent c8f1297adb
commit 5b84acebbc
2 changed files with 12 additions and 12 deletions

View File

@ -1213,7 +1213,7 @@ function setSliderAndColorControl(idx, applyDef=false)
{
if (!(Array.isArray(fxdata) && fxdata.length>idx)) return;
var topPosition = 0;
var controlDefined = (fxdata[idx].substr(0,1) == "@")?true:false;
var controlDefined = (fxdata[idx].substr(0,1) == "@");
var extra = fxdata[idx].substr(1);
var extras = (extra == '')?[]:extra.split(";");
var slOnOff = (extras.length==0 || extras[0]=='')?[]:extras[0].split(",");
@ -1728,7 +1728,7 @@ function tglSegn(s)
function selSegEx(s)
{
var obj = {"seg":[]};
for (let i=0; i<=lSeg; i++) obj.seg.push({"id":i,"sel":(i==s)?true:false});
for (let i=0; i<=lSeg; i++) obj.seg.push({"id":i,"sel":(i==s)});
obj.mainseg = s;
requestJson(obj);
}

View File

@ -8,7 +8,7 @@
// Autogenerated from wled00/data/style.css, do not edit!!
const uint16_t PAGE_settingsCss_length = 807;
const uint8_t PAGE_settingsCss[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xad, 0x55, 0x5d, 0x6f, 0x9b, 0x30,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xad, 0x55, 0x5d, 0x6f, 0x9b, 0x30,
0x14, 0xfd, 0x2b, 0x4c, 0x51, 0xa5, 0x4e, 0x0a, 0x08, 0x08, 0xd0, 0xcc, 0x68, 0xd2, 0xb4, 0xf7,
0xbd, 0x55, 0xd3, 0xa4, 0xa9, 0x0f, 0x06, 0x5f, 0x82, 0x15, 0x63, 0x23, 0xdb, 0xac, 0xa4, 0x88,
0xff, 0x3e, 0x9b, 0x8f, 0x42, 0x52, 0xd4, 0xbe, 0x54, 0x51, 0xa2, 0xe0, 0x6b, 0xae, 0xcf, 0xbd,
@ -65,7 +65,7 @@ const uint8_t PAGE_settingsCss[] PROGMEM = {
// Autogenerated from wled00/data/settings.htm, do not edit!!
const uint16_t PAGE_settings_length = 670;
const uint8_t PAGE_settings[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0x8d, 0x54, 0xdb, 0x6e, 0xdb, 0x30,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x8d, 0x54, 0xdb, 0x6e, 0xdb, 0x30,
0x0c, 0x7d, 0xf7, 0x57, 0x68, 0x2e, 0x36, 0x24, 0x40, 0xdc, 0xb4, 0xe9, 0x30, 0x0c, 0xbe, 0x64,
0x40, 0xd7, 0x6e, 0x2b, 0xb0, 0xa2, 0x05, 0x7a, 0xdb, 0x1e, 0x65, 0x89, 0x76, 0xb8, 0x5a, 0x92,
0x21, 0xd1, 0x69, 0xb2, 0x20, 0xff, 0x3e, 0xd9, 0x49, 0xd3, 0xae, 0x5d, 0xb0, 0xbc, 0x18, 0x26,
@ -113,7 +113,7 @@ const uint8_t PAGE_settings[] PROGMEM = {
// Autogenerated from wled00/data/settings_wifi.htm, do not edit!!
const uint16_t PAGE_settings_wifi_length = 1240;
const uint8_t PAGE_settings_wifi[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xad, 0x57, 0x6d, 0x6f, 0xe2, 0x46,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xad, 0x57, 0x6d, 0x6f, 0xe2, 0x46,
0x10, 0xfe, 0xee, 0x5f, 0xb1, 0xdd, 0x4a, 0x15, 0x48, 0x60, 0xde, 0x9a, 0x28, 0xa2, 0x36, 0x57,
0x02, 0x34, 0x44, 0xba, 0xe6, 0xa8, 0x40, 0x8d, 0xfa, 0xe9, 0xb4, 0xd8, 0x03, 0xde, 0xc6, 0xde,
0xf5, 0x79, 0xd7, 0x18, 0x74, 0xbd, 0xff, 0xde, 0x59, 0xdb, 0xbc, 0x87, 0xf4, 0x1a, 0xa1, 0x28,
@ -197,7 +197,7 @@ const uint8_t PAGE_settings_wifi[] PROGMEM = {
// Autogenerated from wled00/data/settings_leds.htm, do not edit!!
const uint16_t PAGE_settings_leds_length = 6910;
const uint8_t PAGE_settings_leds[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xdd, 0x3c, 0xdb, 0x56, 0xe3, 0x48,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xdd, 0x3c, 0xdb, 0x56, 0xe3, 0x48,
0x92, 0xef, 0xfe, 0x8a, 0x24, 0xbb, 0x9b, 0x96, 0x06, 0x61, 0x24, 0x5f, 0x68, 0xca, 0xb6, 0xcc,
0x62, 0xea, 0xd2, 0xec, 0x40, 0x17, 0x07, 0xd3, 0xdd, 0x33, 0xa7, 0xa6, 0x4e, 0x93, 0x96, 0xd3,
0xb6, 0x0a, 0x59, 0xf2, 0x48, 0x32, 0xe0, 0x05, 0xef, 0x37, 0xed, 0x37, 0xec, 0x97, 0x6d, 0x44,
@ -635,7 +635,7 @@ const uint8_t PAGE_settings_leds[] PROGMEM = {
// Autogenerated from wled00/data/settings_dmx.htm, do not edit!!
const uint16_t PAGE_settings_dmx_length = 1324;
const uint8_t PAGE_settings_dmx[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0x95, 0x56, 0x5b, 0x6f, 0xdb, 0x36,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x95, 0x56, 0x5b, 0x6f, 0xdb, 0x36,
0x14, 0x7e, 0xd7, 0xaf, 0x60, 0xf9, 0x62, 0x09, 0x71, 0x25, 0x2b, 0x99, 0xbb, 0xd5, 0x91, 0x94,
0xd5, 0x4e, 0xe0, 0x04, 0x68, 0xb2, 0xa2, 0x6e, 0xd7, 0x0d, 0xcb, 0x30, 0xd0, 0x12, 0x6d, 0xb1,
0x91, 0x48, 0x8d, 0xa4, 0xec, 0xb8, 0xc3, 0xfe, 0xfb, 0x0e, 0x45, 0x49, 0x76, 0xd3, 0xa6, 0x5d,
@ -724,7 +724,7 @@ const uint8_t PAGE_settings_dmx[] PROGMEM = {
// Autogenerated from wled00/data/settings_ui.htm, do not edit!!
const uint16_t PAGE_settings_ui_length = 2784;
const uint8_t PAGE_settings_ui[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xad, 0x59, 0x6b, 0x73, 0xdb, 0xb8,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xad, 0x59, 0x6b, 0x73, 0xdb, 0xb8,
0x15, 0xfd, 0xae, 0x5f, 0x81, 0x20, 0x19, 0xaf, 0x38, 0x66, 0x68, 0xd9, 0xd9, 0x4e, 0x13, 0x49,
0x94, 0x1b, 0x3f, 0x92, 0xb8, 0xe3, 0x34, 0x69, 0x64, 0x37, 0xbb, 0x93, 0xf1, 0x78, 0x21, 0x12,
0x92, 0x10, 0x83, 0x00, 0x97, 0x00, 0x6d, 0xab, 0x8a, 0xfe, 0x7b, 0xef, 0x05, 0x48, 0x89, 0x92,
@ -904,7 +904,7 @@ const uint8_t PAGE_settings_ui[] PROGMEM = {
// Autogenerated from wled00/data/settings_sync.htm, do not edit!!
const uint16_t PAGE_settings_sync_length = 2814;
const uint8_t PAGE_settings_sync[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0x95, 0x1a, 0x5b, 0x77, 0xda, 0x38,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x95, 0x1a, 0x5b, 0x77, 0xda, 0x38,
0xf3, 0xdd, 0xbf, 0x42, 0xeb, 0x87, 0x6e, 0xd8, 0x12, 0x30, 0x10, 0x68, 0x4a, 0xb0, 0xfb, 0x85,
0x90, 0x26, 0x39, 0xdb, 0x34, 0x14, 0xd2, 0xed, 0xee, 0xd3, 0x1e, 0x61, 0x0b, 0x70, 0xb0, 0x2d,
0xaf, 0x25, 0xe7, 0x72, 0xf6, 0xec, 0x7f, 0xff, 0x66, 0x24, 0xdb, 0x80, 0xb9, 0xf6, 0x21, 0x46,
@ -1086,7 +1086,7 @@ const uint8_t PAGE_settings_sync[] PROGMEM = {
// Autogenerated from wled00/data/settings_time.htm, do not edit!!
const uint16_t PAGE_settings_time_length = 2954;
const uint8_t PAGE_settings_time[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xcd, 0x1a, 0x6b, 0x73, 0xda, 0xb8,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xcd, 0x1a, 0x6b, 0x73, 0xda, 0xb8,
0xf6, 0xbb, 0x7f, 0x85, 0xea, 0x76, 0xb2, 0xb0, 0xe1, 0x9d, 0x92, 0x12, 0xc0, 0xee, 0x25, 0x40,
0x9b, 0xb6, 0x81, 0x64, 0x0a, 0xdd, 0xec, 0xf6, 0x31, 0x5b, 0x61, 0x0b, 0x70, 0x62, 0x24, 0xae,
0x25, 0x87, 0xe4, 0xa6, 0xf9, 0xef, 0xf7, 0xc8, 0xb2, 0x0d, 0x26, 0x18, 0x92, 0x6e, 0xef, 0xcc,
@ -1277,7 +1277,7 @@ const uint8_t PAGE_settings_time[] PROGMEM = {
// Autogenerated from wled00/data/settings_sec.htm, do not edit!!
const uint16_t PAGE_settings_sec_length = 1802;
const uint8_t PAGE_settings_sec[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0x95, 0x57, 0x6d, 0x6f, 0xdb, 0x38,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x95, 0x57, 0x6d, 0x6f, 0xdb, 0x38,
0x12, 0xfe, 0xae, 0x5f, 0xc1, 0xb0, 0x40, 0xd7, 0x06, 0x6c, 0x29, 0x71, 0xef, 0xf6, 0xba, 0x89,
0xa5, 0x5e, 0xd2, 0x38, 0x9b, 0x00, 0xc9, 0x26, 0x88, 0xdd, 0xed, 0x1d, 0x0e, 0x87, 0x82, 0x96,
0x46, 0x16, 0xd7, 0x32, 0xa9, 0x25, 0x29, 0xbb, 0x46, 0xd1, 0xff, 0x7e, 0x33, 0x94, 0xe4, 0xd8,
@ -1396,7 +1396,7 @@ const uint8_t PAGE_settings_sec[] PROGMEM = {
// Autogenerated from wled00/data/settings_um.htm, do not edit!!
const uint16_t PAGE_settings_um_length = 1767;
const uint8_t PAGE_settings_um[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xa5, 0x57, 0x6d, 0x6f, 0xdb, 0x38,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xa5, 0x57, 0x6d, 0x6f, 0xdb, 0x38,
0x12, 0xfe, 0xee, 0x5f, 0xc1, 0xb0, 0x41, 0x22, 0xc1, 0x8a, 0x6c, 0x37, 0xdb, 0xdb, 0xd4, 0x36,
0xe5, 0xdd, 0xf4, 0xe5, 0x1a, 0xa0, 0xbd, 0x04, 0x48, 0x77, 0x0f, 0x87, 0x20, 0xd8, 0xc8, 0xd2,
0xc8, 0xe6, 0x46, 0x22, 0x05, 0x92, 0xb2, 0x93, 0x73, 0xfc, 0xdf, 0x77, 0x48, 0xc9, 0xb2, 0xdd,