diff --git a/_server/editor_blockly.js b/_server/editor_blockly.js index a128b493..86cc4461 100644 --- a/_server/editor_blockly.js +++ b/_server/editor_blockly.js @@ -5,9 +5,13 @@ editor_blockly = function () { initscript = String.raw` (function(){ var getCategory = function(name){ - for(var node of document.getElementById('toolbox').children) { - if(node.getAttribute('name')==name) return node; - } + for(var node of document.getElementById('toolbox').children) { + if(node.getAttribute('name')==name) return node; + } + var node = document.createElement('category'); + node.setAttribute('name',name); + document.getElementById('toolbox').appendChild(node); + return node; } var toolboxObj = { diff --git a/editor-mobile.html b/editor-mobile.html index 8fb7d599..6f945a90 100644 --- a/editor-mobile.html +++ b/editor-mobile.html @@ -165,10 +165,6 @@
diff --git a/editor.html b/editor.html index 9041889e..cff39acc 100644 --- a/editor.html +++ b/editor.html @@ -164,10 +164,6 @@