From 61903665df09e279a7dbfd697cb9ecb54a896b59 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Wed, 16 Sep 2015 20:49:28 +0200 Subject: [PATCH] logic cleanup --- js/zerobin.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/js/zerobin.js b/js/zerobin.js index 833338e..686b515 100644 --- a/js/zerobin.js +++ b/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'); },