diff --git a/index.html b/index.html index e8aa05d9..73297356 100644 --- a/index.html +++ b/index.html @@ -4,23 +4,23 @@ TurtleStitch 2.0 - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/stitchcode/gui.js b/stitchcode/gui.js index 6d776943..91e41aad 100644 --- a/stitchcode/gui.js +++ b/stitchcode/gui.js @@ -1588,16 +1588,26 @@ IDE_Morph.prototype.projectMenu = function () { menu.addItem( 'Import tools', function () { - myself.droppedText( - myself.getURL(myself.resourceURL('tools.xml')), - 'tools' + if (location.protocol === 'file:') { + myself.importLocalFile(); + return; + } + myself.getURL( + myself.resourceURL('libraries', 'tools.xml'), + function (txt) { + myself.droppedText(txt, 'tools'); + } ); }, 'load the official library of\npowerful blocks' ); - menu.addItem( + menu.addItem( 'Libraries...', function() { + if (location.protocol === 'file:') { + myself.importLocalFile(); + return; + } myself.getURL( myself.resourceURL('libraries', 'LIBRARIES'), function (txt) {