summaryrefslogtreecommitdiffstats
path: root/js/messaging.js
diff options
context:
space:
mode:
authorAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-03-01 00:00:01 +0100
committerAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-03-01 00:00:01 +0100
commit9c98b2328af7a2cb30930a3f9600f7a5fc146d6f (patch)
treea544ade857376a32d581868ec1724383ce7bfbeb /js/messaging.js
parentbrainfart (diff)
downloadbeziapp-9c98b2328af7a2cb30930a3f9600f7a5fc146d6f.tar
beziapp-9c98b2328af7a2cb30930a3f9600f7a5fc146d6f.tar.gz
beziapp-9c98b2328af7a2cb30930a3f9600f7a5fc146d6f.tar.bz2
beziapp-9c98b2328af7a2cb30930a3f9600f7a5fc146d6f.tar.lz
beziapp-9c98b2328af7a2cb30930a3f9600f7a5fc146d6f.tar.xz
beziapp-9c98b2328af7a2cb30930a3f9600f7a5fc146d6f.tar.zst
beziapp-9c98b2328af7a2cb30930a3f9600f7a5fc146d6f.zip
Diffstat (limited to 'js/messaging.js')
-rw-r--r--js/messaging.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/messaging.js b/js/messaging.js
index 0877ca2..6dc546a 100644
--- a/js/messaging.js
+++ b/js/messaging.js
@@ -253,7 +253,7 @@ async function deleteMsg(id) {
function displayMessage(id, data) {
if(data["telo"].substring(0, 21) == "<!-- beziapp-e2eemsg-") {
var datatodecrypt = data["telo"].substring(29+Number(data["telo"].substring(21, 25)), data["telo"].length-6) // length-6 da zbrišemo zadnji </div>
- var randomencdivid = Math.floor(Math.random() * 9999).toString().strPad(4, '0');
+ var randomencdivid = Math.floor(Math.random() * 9999).toString().padStart(4, '0');
var msgcontent = "<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="
+"document.getElementById('beziapp-msg-e2ee-content-"+randomencdivid+"').innerHTML=filterXSS(sjcl.decrypt(document.getElementById('beziapp-msg-e2ee-password-"