diff --git a/js/privatebin.js b/js/privatebin.js
index 6031916b..dc02e8fd 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 08c42e42..a74e767b 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 f1dc8f37..865b0295 100644
--- a/tpl/page.php
+++ b/tpl/page.php
@@ -50,7 +50,7 @@ endif;
?>
-
+