summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton L. Šijanec <sijanecantonluka@gmail.com>2020-05-14 20:46:13 +0200
committerAnton L. Šijanec <sijanecantonluka@gmail.com>2020-05-14 20:46:13 +0200
commit1b514efdf808e27a012facd9a26563a452e040f1 (patch)
tree6ec4302e2d2db88f938ee95e3f2243cdbd481485
parentsingle byte commit (diff)
downloadbeziapp-1b514efdf808e27a012facd9a26563a452e040f1.tar
beziapp-1b514efdf808e27a012facd9a26563a452e040f1.tar.gz
beziapp-1b514efdf808e27a012facd9a26563a452e040f1.tar.bz2
beziapp-1b514efdf808e27a012facd9a26563a452e040f1.tar.lz
beziapp-1b514efdf808e27a012facd9a26563a452e040f1.tar.xz
beziapp-1b514efdf808e27a012facd9a26563a452e040f1.tar.zst
beziapp-1b514efdf808e27a012facd9a26563a452e040f1.zip
-rw-r--r--js/messaging.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/js/messaging.js b/js/messaging.js
index 8138ed5..38b1625 100644
--- a/js/messaging.js
+++ b/js/messaging.js
@@ -502,20 +502,18 @@ function setupEventListeners() {
var addrparts = window.location.href.split("/"); // engleski
var encrypted_message = sjcl.encrypt($("#msg-e2ee-pass-input").val(), msgcontent);
-
msgcontent = `
<script src="${addrparts[0]}//${addrparts[2]}/js/lib/sjcl.js"></script>
<div id="beziapp-msg-e2ee-form-${randomencdivid}">
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="
- const ENCRYPTED_MESSAGE_REGEX = /<!-- beziapp-e2eemsg-(\d{4}) -->(\S+?)<!-- end-msg -->/g;
try {
console.log($('beziapp-msg-e2ee-content-${randomencdivid}').text());
$('#beziapp-msg-e2ee-content-${randomencdivid}').html(
sjcl.decrypt(
$('#beziapp-msg-e2ee-password-${randomencdivid}').val(),
- ENCRYPTED_MESSAGE_REGEX.exec($('beziapp-msg-e2ee-content-${randomencdivid}').text())[2]
+ $('#beziapp-msg-e2ee-content-${randomencdivid}').text()
)
);
$('#beziapp-msg-e2ee-content-${randomencdivid}').show();