Commits

David Chambers committed 39a5eab

Prevent UI from appearing briefly before switching to the text/plain data URI.

Comments (0)

Files changed (1)

           var encoded = encode(editor.value + '\n\n[' + url + ']');
           location = 'data:text/plain;base64,' + encoded;
         });
-      } else if (presentationMode) {
-        resizeSidebar(0);
       } else {
-        if (preferredWidth > sidebarMinimumWidth) {
-          resizeSidebar(preferredWidth);
+        if (presentationMode) {
+          resizeSidebar(0);
+        } else {
+          if (preferredWidth > sidebarMinimumWidth) {
+            resizeSidebar(preferredWidth);
+          }
+          if (!hash) setValue(editor.value, 0, editor.value.length);
         }
-        if (!hash) setValue(editor.value, 0, editor.value.length);
+        body.removeChild(mask);
       }
-      body.removeChild(mask);
       shortenUrl();
     }
     // initialize `#counter`