aboutsummaryrefslogtreecommitdiffhomepage
path: root/public
diff options
context:
space:
mode:
authorMarvin Borner2019-01-23 22:05:34 +0100
committerMarvin Borner2019-01-23 22:05:34 +0100
commit9c462ef4be0a7510607ac1d06b57cbe97e71d26a (patch)
tree5ed279628a482f50bbdc831c0f3e87a665128857 /public
parenteb39bb0d2f4467bddd3a128979830de3c0833f77 (diff)
Added ugly solution to function access
Diffstat (limited to 'public')
-rw-r--r--public/scripts/2_encryption.js7
-rw-r--r--public/scripts/chat.js2
2 files changed, 8 insertions, 1 deletions
diff --git a/public/scripts/2_encryption.js b/public/scripts/2_encryption.js
index 05b4b69..4d05780 100644
--- a/public/scripts/2_encryption.js
+++ b/public/scripts/2_encryption.js
@@ -85,4 +85,9 @@ function testEncryption() {
})
}
-testEncryption();
+// TODO: Export as module or sth
+// REMEMBER: UGLY EXPORT!
+window.generateKeys = generateKeys;
+window.encrypt = encrypt;
+window.decrypt = decrypt;
+window.testEncryption = testEncryption;
diff --git a/public/scripts/chat.js b/public/scripts/chat.js
index b2f2816..b33d503 100644
--- a/public/scripts/chat.js
+++ b/public/scripts/chat.js
@@ -66,3 +66,5 @@ $(document).ready(() => {
$('[toggle-contact-modal]').on('click', () => $('#add_contact_modal').toggleClass('is-active'))
});
+
+testEncryption();