diff --git a/js/privatebin.js b/js/privatebin.js index 6031916..dc02e8f 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -4926,7 +4926,6 @@ jQuery.PrivateBin = (function($, RawDeflate) { plaintexts[i][1] ); } - DiscussionViewer.finishDiscussion(); }); } @@ -4980,6 +4979,12 @@ jQuery.PrivateBin = (function($, RawDeflate) { // we have to pass in remaining_time here TopNav.showEmailButton(paste.getTimeToLive()); } + + // only offer adding comments, after paste was successfully decrypted + if (paste.isDiscussionEnabled()) { + DiscussionViewer.finishDiscussion(); + } + }) .catch((err) => { // wait for the user to type in the password, diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 08c42e4..a74e767 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -72,7 +72,7 @@ endif; ?> - + diff --git a/tpl/page.php b/tpl/page.php index f1dc8f3..865b029 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -50,7 +50,7 @@ endif; ?> - +