diff --git a/sdkjs-plugins/content/macros/scripts/code.js b/sdkjs-plugins/content/macros/scripts/code.js index 2538f68d..44107806 100644 --- a/sdkjs-plugins/content/macros/scripts/code.js +++ b/sdkjs-plugins/content/macros/scripts/code.js @@ -263,7 +263,11 @@ ace.config.loadModule('ace/ext/html_beautify', function (beautify) { if (currentElement === activeElement) return; - macrosList.insertBefore(activeElement, nextElement); + try { + macrosList.insertBefore(activeElement, nextElement); + } catch (err) { + return; + } let indNext = Content.macrosArray.findIndex(function(el) { return (nextElement && el.name == nextElement.innerText) }) @@ -287,7 +291,11 @@ ace.config.loadModule('ace/ext/html_beautify', function (beautify) { if (currentElement === activeElement) return; - functionList.insertBefore(activeElement, nextElement); + try { + functionList.insertBefore(activeElement, nextElement); + } catch (err) { + return; + } let indNext = CustomFunctions.macrosArray.findIndex(function(el) { return (nextElement && el.name == nextElement.innerText) }) @@ -437,6 +445,8 @@ ace.config.loadModule('ace/ext/html_beautify', function (beautify) { window.onItemClick = onItemClick; function onClickCC(event) { + if (!event) + return; event.preventDefault(); event.stopPropagation(); const srcElement = event.srcElement; diff --git a/sdkjs-plugins/content/macros/translations/cs-CS.json b/sdkjs-plugins/content/macros/translations/cs-CZ.json similarity index 80% rename from sdkjs-plugins/content/macros/translations/cs-CS.json rename to sdkjs-plugins/content/macros/translations/cs-CZ.json index 0994deef..aa458cd7 100644 --- a/sdkjs-plugins/content/macros/translations/cs-CS.json +++ b/sdkjs-plugins/content/macros/translations/cs-CZ.json @@ -12,5 +12,7 @@ "Unmake autostart": "Zrušit automatické spuštění", "Custom function": "Vlastní funkce", "Custom functions": "Vlastní funkce", - "Ok": "OK" + "Ok": "OK", + "Add macros": "Přidejte makra", + "Add custom function": "Přidejte vlastní funkce" } \ No newline at end of file diff --git a/sdkjs-plugins/content/macros/translations/es-ES.json b/sdkjs-plugins/content/macros/translations/es-ES.json index 33894a4f..57007f83 100644 --- a/sdkjs-plugins/content/macros/translations/es-ES.json +++ b/sdkjs-plugins/content/macros/translations/es-ES.json @@ -12,5 +12,7 @@ "Unmake autostart": "Deshacer el inicio automático", "Custom function": "Función personalizada", "Custom functions": "Funciones personalizadas", - "Ok": "OK" + "Ok": "OK", + "Add macros": "Añadir macros", + "Add custom function": "Añadir función personalizada" } \ No newline at end of file diff --git a/sdkjs-plugins/content/macros/translations/fr-FR.json b/sdkjs-plugins/content/macros/translations/fr-FR.json index b8ec2dca..9fdfe547 100644 --- a/sdkjs-plugins/content/macros/translations/fr-FR.json +++ b/sdkjs-plugins/content/macros/translations/fr-FR.json @@ -12,5 +12,7 @@ "Unmake autostart": "Annuler le démarrage automatique", "Custom function": "Fonction personnalisée", "Custom functions": "Fonctions personnalisées", - "Ok": "OK" + "Ok": "OK", + "Add macros": "Ajouter des macros", + "Add custom function": "Ajouter une fonction personnalisée" } \ No newline at end of file diff --git a/sdkjs-plugins/content/macros/translations/pt-BR.json b/sdkjs-plugins/content/macros/translations/pt-BR.json index f90cce68..50dc0f49 100644 --- a/sdkjs-plugins/content/macros/translations/pt-BR.json +++ b/sdkjs-plugins/content/macros/translations/pt-BR.json @@ -12,5 +12,7 @@ "Unmake autostart": "Ativar o início automático", "Custom function": "Função personalizada", "Custom functions": "Funções personalizadas", - "Ok": "OK" + "Ok": "OK", + "Add macros": "Adicionar macros", + "Add custom function": "Adicionar função personalizada" } \ No newline at end of file diff --git a/sdkjs-plugins/content/macros/translations/ru-RU.json b/sdkjs-plugins/content/macros/translations/ru-RU.json index 5ebbb18a..8a1d0730 100644 --- a/sdkjs-plugins/content/macros/translations/ru-RU.json +++ b/sdkjs-plugins/content/macros/translations/ru-RU.json @@ -12,5 +12,7 @@ "Unmake autostart": "Отменить автозапуск", "Custom function": "Пользовательская функция", "Custom functions": "Пользовательские функции", - "Ok": "OK" + "Ok": "OK", + "Add macros": "Добавить макросы", + "Add custom function": "Добавить пользовательскую функцию" } \ No newline at end of file diff --git a/sdkjs-plugins/content/macros/translations/zh-ZH.json b/sdkjs-plugins/content/macros/translations/zh-ZH.json index f84974f3..e7218b6a 100644 --- a/sdkjs-plugins/content/macros/translations/zh-ZH.json +++ b/sdkjs-plugins/content/macros/translations/zh-ZH.json @@ -10,7 +10,9 @@ "Copy": "副本", "Make autostart": "自动启动", "Unmake autostart": "取消自动启动", - "Custom function": "自定义功能", - "Custom functions": "自定义功能", - "Ok": "确定" + "Custom function": "自定义函数", + "Custom functions": "自定义函数", + "Ok": "确定", + "Add macros": "添加宏", + "Add custom function": "添加自定义函数" } \ No newline at end of file