aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/scripts
diff options
context:
space:
mode:
authorMarvin Borner2019-01-27 18:25:08 +0100
committerMarvin Borner2019-01-27 18:25:08 +0100
commit517736ae1d3813fb3bc7e32c36cd90906d530b91 (patch)
tree5791a8712fb1f32417b429283fe11cb426e859f3 /public/scripts
parentdfce4c5a178275f4b7226ae397226cbbf84571a8 (diff)
Cleaned up code
Diffstat (limited to 'public/scripts')
-rw-r--r--public/scripts/0_general.js4
-rw-r--r--public/scripts/chat.js6
-rw-r--r--public/scripts/encryption.js (renamed from public/scripts/2_encryption.js)1
-rw-r--r--public/scripts/input_pin.js (renamed from public/scripts/4_input_pin.js)0
-rw-r--r--public/scripts/main.js7
-rw-r--r--public/scripts/peer.js (renamed from public/scripts/1_peer.js)0
-rw-r--r--public/scripts/wordlist.js (renamed from public/scripts/3_wordlist.js)0
7 files changed, 10 insertions, 8 deletions
diff --git a/public/scripts/0_general.js b/public/scripts/0_general.js
deleted file mode 100644
index ea259e7..0000000
--- a/public/scripts/0_general.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/**
- * General imports
- */
-require('@fortawesome/fontawesome-free/js/all.min');
diff --git a/public/scripts/chat.js b/public/scripts/chat.js
index 569e062..3123926 100644
--- a/public/scripts/chat.js
+++ b/public/scripts/chat.js
@@ -1,8 +1,8 @@
// general imports
const $ = require('jquery');
-const encryption = require('./2_encryption');
-const wordList = require('./3_wordlist');
-const pinInput = require('./4_input_pin');
+const encryption = require('./encryption');
+const wordList = require('./wordlist');
+const pinInput = require('./input_pin');
const xkcdPassword = require('xkcd-password');
// setup vars
diff --git a/public/scripts/2_encryption.js b/public/scripts/encryption.js
index 7c7fb9b..81a592a 100644
--- a/public/scripts/2_encryption.js
+++ b/public/scripts/encryption.js
@@ -1,6 +1,5 @@
const Dexie = require('dexie');
const openpgp = require('openpgp');
-openpgp.initWorker({path: 'openpgp.worker.js'});
let db;
diff --git a/public/scripts/4_input_pin.js b/public/scripts/input_pin.js
index b496e95..b496e95 100644
--- a/public/scripts/4_input_pin.js
+++ b/public/scripts/input_pin.js
diff --git a/public/scripts/main.js b/public/scripts/main.js
new file mode 100644
index 0000000..6b3d287
--- /dev/null
+++ b/public/scripts/main.js
@@ -0,0 +1,7 @@
+/**
+ * This file only pulls all dependencies together
+ * so it is compileable by browserify
+ */
+require('@fortawesome/fontawesome-free/js/all.min');
+require('./peer');
+require('./chat');
diff --git a/public/scripts/1_peer.js b/public/scripts/peer.js
index 3b6cd6d..3b6cd6d 100644
--- a/public/scripts/1_peer.js
+++ b/public/scripts/peer.js
diff --git a/public/scripts/3_wordlist.js b/public/scripts/wordlist.js
index bce5fca..bce5fca 100644
--- a/public/scripts/3_wordlist.js
+++ b/public/scripts/wordlist.js