Skip to content

Commit

Permalink
[EasyColorCode] Correction and var rename commonEvents
Browse files Browse the repository at this point in the history
  • Loading branch information
tonhuisman committed Feb 22, 2024
1 parent 497d000 commit 01ce6ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions static/espeasy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ var commonCommands = ["AccessInfo", "Background", "Build", "ClearAccessBlock", "
"ControllerEnable", "DateTime", "Debug", "Dec", "DeepSleep", "DisablePriorityTask", "DNS", "DST", "EraseSDKWiFi", "ExecuteRules", "Gateway", "I2Cscanner", "Inc",
"IP", "Let", "Load", "LogEntry", "LogPortStatus", "LoopTimerSet", "LoopTimerSet_ms", "MemInfo", "MemInfoDetail", "Name", "Password", "PostToHTTP", "Publish", "PublishR",
"Reboot", "Reset", "Save", "SendTo", "SendToHTTP", "SendToUDP", "Settings", "Subnet", "Subscribe", "TaskClear", "TaskClearAll",
"TaskDisable", "TaskEnable", "TaskRun", "TaskValueSet", "TaskValueSetAndRun", "ThingspeakReply", "TimerPause", "TimerResume", "TimerSet", "TimerSet_ms", "TimeZone",
"TaskDisable", "TaskEnable", "TaskRun", "TaskValueSet", "TaskValueSetAndRun", "TimerPause", "TimerResume", "TimerSet", "TimerSet_ms", "TimeZone",
"UdpPort", "UdpTest", "Unit", "UseNTP", "WdConfig", "WdRead", "WiFi", "WiFiAllowAP", "WiFiAPMode", "WiFiConnect", "WiFiDisconnect", "WiFiKey",
"WiFiKey2", "WiFiMode", "WiFiScan", "WiFiSSID", "WiFiSSID2", "WiFiSTAMode",
"Event", "AsyncEvent",
"GPIO", "GPIOToggle", "LongPulse", "LongPulse_mS", "Monitor", "Pulse", "PWM", "Servo", "Status", "Tone", "RTTTL", "UnMonitor",];
var commonString2 = ["Clock#Time", "Login#Failed", "MQTT#Connected", "MQTT#Disconnected", "MQTTimport#Connected", "MQTTimport#Disconnected", "Rules#Timer", "System#Boot",
"System#BootMode", "System#Sleep", "System#Wake", "TaskExit#", "TaskInit#", "Time#Initialized", "Time#Set", "WiFi#APmodeDisabled", "WiFi#APmodeEnabled",
var commonEvents = ["Clock#Time", "Login#Failed", "MQTT#Connected", "MQTT#Disconnected", "MQTTimport#Connected", "MQTTimport#Disconnected", "Rules#Timer", "System#Boot",
"System#BootMode", "System#Sleep", "System#Wake", "TaskExit#", "TaskInit#", "ThingspeakReply", "Time#Initialized", "Time#Set", "WiFi#APmodeDisabled", "WiFi#APmodeEnabled",
"WiFi#ChangedAccesspoint", "WiFi#ChangedWiFichannel", "WiFi#Connected", "WiFi#Disconnected"];
var commonPlugins = [
//P003
Expand Down Expand Up @@ -170,7 +170,7 @@ for (const element2 of pluginDispKind) {
}
}

var EXTRAWORDS = commonAtoms.concat(commonPlugins, commonKeywords, commonCommands, commonString2, commonTag, commonNumber, commonMath, commonWarning, taskSpecifics, AnythingElse);
var EXTRAWORDS = commonAtoms.concat(commonPlugins, commonKeywords, commonCommands, commonEvents, commonTag, commonNumber, commonMath, commonWarning, taskSpecifics, AnythingElse);

var rEdit;
function initCM() {
Expand Down Expand Up @@ -226,8 +226,8 @@ function initCM() {
var lCcommonCommands = commonCommands.map(name => name.toLowerCase());
commonCommands = commonCommands.concat(lCcommonCommands);

var lCcommonString2 = commonString2.map(name => name.toLowerCase());
commonString2 = commonString2.concat(lCcommonString2);
var lCcommonString2 = commonEvents.map(name => name.toLowerCase());
commonEvents = commonEvents.concat(lCcommonString2);

var lCcommonPlugins = commonPlugins.map(name => name.toLowerCase());
commonPlugins = commonPlugins.concat(lCcommonPlugins);
Expand Down Expand Up @@ -256,7 +256,7 @@ function initCM() {
define('atom', commonAtoms);
define('keyword', commonKeywords);
define('builtin', commonCommands);
define('string-2', commonString2);
define('events', commonEvents);
define('def', commonPlugins);
define('tag', commonTag);
define('number', commonNumber);
Expand Down Expand Up @@ -357,7 +357,7 @@ function initCM() {
if (/\w/.test(ch)) {
if (stream.match("#")) {
stream.eatWhile(/[\w.#]/);
return 'string-2';
return 'events';
}
}

Expand Down
Loading

0 comments on commit 01ce6ff

Please sign in to comment.