diff options
author | Anton L. Šijanec <sijanecantonluka@gmail.com> | 2020-05-14 20:46:13 +0200 |
---|---|---|
committer | Anton L. Šijanec <sijanecantonluka@gmail.com> | 2020-05-14 20:46:13 +0200 |
commit | 1b514efdf808e27a012facd9a26563a452e040f1 (patch) | |
tree | 6ec4302e2d2db88f938ee95e3f2243cdbd481485 | |
parent | single byte commit (diff) | |
download | beziapp-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.js | 4 |
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(); |