aboutsummaryrefslogtreecommitdiffstats
path: root/extension
diff options
context:
space:
mode:
Diffstat (limited to 'extension')
-rw-r--r--extension/background.js11
-rw-r--r--extension/manifest.json12
2 files changed, 23 insertions, 0 deletions
diff --git a/extension/background.js b/extension/background.js
new file mode 100644
index 0000000..3fa39c1
--- /dev/null
+++ b/extension/background.js
@@ -0,0 +1,11 @@
+const ws = new WebSocket("ws://localhost:8888");
+
+ws.onmessage = function(event) {
+ const req = JSON.parse(event.data);
+
+ const response = {
+ names: [".", "..", "hi.txt"]
+ };
+
+ ws.send(JSON.stringify(response));
+};
diff --git a/extension/manifest.json b/extension/manifest.json
new file mode 100644
index 0000000..0049977
--- /dev/null
+++ b/extension/manifest.json
@@ -0,0 +1,12 @@
+{
+ "manifest_version": 2,
+
+ "name": "ChromeFS Extension",
+ "description": "Connects to ChromeFS filesystem",
+ "version": "1.0",
+
+ "background": {
+ "scripts": ["background.js"],
+ "persistent": true
+ }
+}