diff options
| author | jmoenig <jens@moenig.org> | 2013-04-10 08:33:50 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2013-04-10 08:33:50 +0200 |
| commit | cb41576e5ac53707bac1c16c46b851a269a41a6b (patch) | |
| tree | da87defadb239d3ff7e57811c99ac45a626b6266 /gui.js | |
| parent | 2fe044f0a36e7e8dedbc2279ee73420229ecc3d0 (diff) | |
| download | snap-byow-cb41576e5ac53707bac1c16c46b851a269a41a6b.tar.gz snap-byow-cb41576e5ac53707bac1c16c46b851a269a41a6b.zip | |
Load shared projects from different formats
cloud data and plain project format
Diffstat (limited to 'gui.js')
| -rw-r--r-- | gui.js | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -68,7 +68,7 @@ sb, CommentMorph, CommandBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2013-April-09'; +modules.gui = '2013-April-10'; // Declarations @@ -253,7 +253,6 @@ IDE_Morph.prototype.openIn = function (world) { this.shield.color = this.color; this.shield.setExtent(this.parent.extent()); this.parent.add(this.shield); - myself.showMessage('Fetching project\nfrom the cloud...'); SnapCloud.getPublicProject( location.hash.substr(9), @@ -264,7 +263,11 @@ IDE_Morph.prototype.openIn = function (world) { msg = myself.showMessage('Opening project...'); }, function () { - myself.rawOpenCloudDataString(projectData); + if (projectData.indexOf('<snapdata') === 0) { + myself.rawOpenCloudDataString(projectData); + } else if (projectData.indexOf('<project') === 0) { + myself.rawOpenProjectString(projectData); + } }, function () { myself.shield.destroy(); |
