diff options
-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(); |