Explorar o código

logic cleanup

El RIDO %!s(int64=11) %!d(string=hai) anos
pai
achega
61903665df
Modificáronse 1 ficheiros con 4 adicións e 10 borrados
  1. 4 10
      js/zerobin.js

+ 4 - 10
js/zerobin.js

@@ -548,7 +548,9 @@ $(function() {
                         this.clearText.html(
                             converter.makeHtml(this.clearText.html())
                         );
+                        this.clearText.removeClass('hidden');
                     }
+                    this.prettyMessage.addClass('hidden');
                     break;
                 case 'syntaxhighlighting':
                     if (typeof prettyPrint == 'function') prettyPrint();
@@ -556,16 +558,8 @@ $(function() {
                     // Convert URLs to clickable links.
                     helper.urls2links(this.clearText);
                     helper.urls2links(this.prettyPrint);
-            }
-            if (format == 'markdown')
-            {
-                this.clearText.removeClass('hidden');
-                this.prettyMessage.addClass('hidden');
-            }
-            else
-            {
-                this.clearText.addClass('hidden');
-                this.prettyMessage.removeClass('hidden');
+                    this.clearText.addClass('hidden');
+                    this.prettyMessage.removeClass('hidden');
             }
             if (format == 'plaintext') this.prettyPrint.removeClass('prettyprint');
         },