Просмотр исходного кода

update preview if format is changed, resolves #60

El RIDO 10 лет назад
Родитель
Сommit
6144e73405
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      js/privatebin.js

+ 4 - 0
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);
+            }
         },
 
         /**