From 9c462ef4be0a7510607ac1d06b57cbe97e71d26a Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 23 Jan 2019 22:05:34 +0100 Subject: Added ugly solution to function access --- public/scripts/2_encryption.js | 7 ++++++- public/scripts/chat.js | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'public') 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(); -- cgit v1.2.3