Open the editor when loading from URL params

This commit is contained in:
Ray Schamp 2015-05-15 10:10:18 -04:00
parent f12635d2b3
commit 70a5f49d9d

View file

@ -158,10 +158,12 @@ function sendURLtoFlash() {
if (urls.length <= 0) return; if (urls.length <= 0) return;
if (Scratch.FlashApp.ASobj.ASloadGithubURL !== undefined) { if (Scratch.FlashApp.ASobj.ASloadGithubURL !== undefined) {
$(document).trigger("editor:extensionLoaded", {method: "url", urls: urls}); $(document).trigger("editor:extensionLoaded", {method: "url", urls: urls});
showPage(editorId);
Scratch.FlashApp.ASobj.ASloadGithubURL(urls); Scratch.FlashApp.ASobj.ASloadGithubURL(urls);
} else { } else {
$(document).on("editor:ready", function(e) { $(document).on("editor:ready", function(e) {
$(document).trigger("editor:extensionLoaded", {method: "url", urls: urls}); $(document).trigger("editor:extensionLoaded", {method: "url", urls: urls});
showPage(editorId);
Scratch.FlashApp.ASobj.ASloadGithubURL(urls); Scratch.FlashApp.ASobj.ASloadGithubURL(urls);
$(this).off(e); $(this).off(e);
}); });