| 42 | }); |
| 43 | |
| 44 | function doneLoading() { |
| 45 | editor.container.removeClass("friendlycode-loading"); |
| 46 | editor.panes.codeMirror.clearHistory(); |
| 47 | editor.toolbar.refresh(); |
| 48 | if (parachute.restore()) { |
| 49 | editor.toolbar.showDataRestoreHelp(); |
| 50 | } else { |
| 51 | // Only save data on page unload if it's different from |
| 52 | // the URL we just (hopefully) loaded. |
| 53 | parachute.refresh(); |
| 54 | } |
| 55 | editor.panes.codeMirror.reparse(); |
| 56 | editor.panes.codeMirror.focus(); |
| 57 | editor.panes.codeMirror.refresh(); |
| 58 | ready.resolve(); |
| 59 | } |
| 60 | |
| 61 | editor.toolbar.setStartPublish(publishUI.start); |
| 62 | editor.container.addClass("friendlycode-loading"); |