summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrstular <rok@stular.eu>2020-05-15 00:40:56 +0200
committerrstular <rok@stular.eu>2020-05-15 00:41:07 +0200
commit5bce54d971637b4976f705f40e01138320983323 (patch)
treefcfb3150b17100475e8ad619ec31e42397d3eccc
parentMerge branch 'dev' of github.com:beziapp/beziapp.github.io into dev (diff)
downloadbeziapp-5bce54d971637b4976f705f40e01138320983323.tar
beziapp-5bce54d971637b4976f705f40e01138320983323.tar.gz
beziapp-5bce54d971637b4976f705f40e01138320983323.tar.bz2
beziapp-5bce54d971637b4976f705f40e01138320983323.tar.lz
beziapp-5bce54d971637b4976f705f40e01138320983323.tar.xz
beziapp-5bce54d971637b4976f705f40e01138320983323.tar.zst
beziapp-5bce54d971637b4976f705f40e01138320983323.zip
-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 -->