summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/messaging.js27
1 files changed, 13 insertions, 14 deletions
diff --git a/js/messaging.js b/js/messaging.js
index d3ebdd0..646c088 100644
--- a/js/messaging.js
+++ b/js/messaging.js
@@ -271,20 +271,20 @@ function displayMessage(id, data) {
value="Decrypt"
class="btn waves-effect waves-light"
onclick="
- try {
+ try {
$('#beziapp-msg-e2ee-content-${randomencdivid}').html(
filterXSS(
sjcl.decrypt(
- $('#beziapp-msg-e2ee-password-${randomencdivid}').val(),
- $('#beziapp-msg-e2ee-content-${randomencdivid}').html()
+ $('#beziapp-msg-e2ee-password-${randomencdivid}').val(),
+ $('#beziapp-msg-e2ee-content-${randomencdivid}').html()
)
)
);
- $('#beziapp-msg-e2ee-content-${randomencdivid}').show();
- $('#beziapp-msg-e2ee-form-${randomencdivid}').hide();
- } catch (err) {
- alert('${D("incorrectPassword")}');
- }
+ $('#beziapp-msg-e2ee-content-${randomencdivid}').show();
+ $('#beziapp-msg-e2ee-form-${randomencdivid}').hide();
+ } catch (err) {
+ alert('${D("incorrectPassword")}');
+ }
"
>
${S("decrypt")}
@@ -508,7 +508,7 @@ function setupEventListeners() {
This message was encrypted by BežiApp.
<input type="password" autocomplete="new-password" id="beziapp-msg-e2ee-password-${randomencdivid}" placeholder="Enter password ...">
<input type="button" value="Decrypt" onclick="
- try {
+ try {
console.log($('beziapp-msg-e2ee-content-${randomencdivid}').text());
$('#beziapp-msg-e2ee-content-${randomencdivid}').html(
sjcl.decrypt(
@@ -518,11 +518,10 @@ function setupEventListeners() {
);
$('#beziapp-msg-e2ee-content-${randomencdivid}').show();
$('#beziapp-msg-e2ee-form-${randomencdivid}').hide();
- } catch(err) {
- alert('${D("incorrectPassword")}');
- }
- "
- >
+ } catch(err) {
+ alert('${D("incorrectPassword")}');
+ }
+ ">
</div>
<div id="beziapp-msg-e2ee-content-${randomencdivid}" hidden>
<!-- beziapp-e2eemsg-${msgcontent.length.toString().padStart(4, "0")} -->${encrypted_message}<!-- end-msg -->