From 6144e73405ff815ae947a4dd2001646fd147b391 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Thu, 11 Aug 2016 11:40:37 +0200 Subject: [PATCH] update preview if format is changed, resolves #60 --- js/privatebin.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/privatebin.js b/js/privatebin.js index 2fb8a62..4344efc 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -1290,6 +1290,10 @@ $(function() { var target = $(event.target); $('#pasteFormatter').val(target.data('format')); $('#pasteFormatterDisplay').text(target.text()); + + if (this.messagePreview.parent().hasClass('active')) { + this.viewPreview(event); + } }, /**