From f593f67d50d66e12da3861b0c5feeb320ed2e62b Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 18 Mar 2013 16:07:39 +0100 Subject: [PATCH] Cloud #signup URL switch adding #signup to the URL directly opens the cloud signup dialog. http://snap.berkeley.edu/snapsource/snap.html#signup --- gui.js | 7 +++++++ history.txt | 3 ++- readme.txt | 2 +- tools.xml | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gui.js b/gui.js index 0619201a..1ba307e8 100644 --- a/gui.js +++ b/gui.js @@ -233,6 +233,8 @@ IDE_Morph.prototype.openIn = function (world) { } else if (location.hash.substr(0, 6) === '#lang:') { this.setLanguage(location.hash.substr(6)); this.newProject(); + } else if (location.hash.substr(0, 7) === '#signup') { + this.createCloudAccount(); } }; @@ -2860,6 +2862,11 @@ IDE_Morph.prototype.initializeCloud = function () { IDE_Morph.prototype.createCloudAccount = function () { var myself = this, world = this.world(); +/* + // force-logout, commented out for now: + delete localStorage['-snap-user']; + SnapCloud.clear(); +*/ new DialogBoxMorph( null, function (user) { diff --git a/history.txt b/history.txt index 46e615af..a7719a13 100755 --- a/history.txt +++ b/history.txt @@ -1527,4 +1527,5 @@ ______ 130318 ------ * GUI, Blocks, BYOB, Widgets: Scaling Blocks and Scripts (shift-click on settings menu) -* Widets: numerical prompts \ No newline at end of file +* Widets: numerical prompts +* GUI: #signup URL switch \ No newline at end of file diff --git a/readme.txt b/readme.txt index 05d67eb1..159f25c4 100644 --- a/readme.txt +++ b/readme.txt @@ -7,7 +7,7 @@ saving, loading, exporting, importing artefacts: projects, blocks, sprites -URL options: #run: #open: +URL options: #run: #open: #lang: #signup supported browsers, problems with the Android virtual keyboard diff --git a/tools.xml b/tools.xml index 03be8ddf..5024c8ac 100644 --- a/tools.xml +++ b/tools.xml @@ -1 +1 @@ -1datamapmany1data lists11110i1 contcatchtagcontcatchtag \ No newline at end of file +1datamapmany1data lists11110i1 contcatchtagcontcatchtag \ No newline at end of file