Permalink
Browse files

Restore panels if you click new from the "home" screen

  • Loading branch information...
1 parent dda20c4 commit f2128eaef176f403758b32b4c5eca3b71fc983b5 @remy remy committed Apr 30, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 js/chrome/navigation.js
View
@@ -156,6 +156,17 @@ $('#createnew').click(function () {
}
jsbin.panels.saveOnExit = true;
+
+ // first try to restore their default panels
+ jsbin.panels.restore();
+
+ // if nothing was shown, show html & live
+ setTimeout(function () {
+ if (jsbin.panels.getVisible().length === 0) {
+ jsbin.panels.panels.html.show();
+ jsbin.panels.panels.live.show();
+ }
+ }, 0)
});
jsbin.settings.includejs = jsbin.settings.includejs || false;

0 comments on commit f2128ea

Please sign in to comment.