summaryrefslogtreecommitdiff
path: root/background/message_server.js
diff options
context:
space:
mode:
Diffstat (limited to 'background/message_server.js')
-rw-r--r--background/message_server.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/background/message_server.js b/background/message_server.js
deleted file mode 100644
index a541a04..0000000
--- a/background/message_server.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Myext message server
- *
- * Copyright (C) 2021 Wojtek Kosior
- * Redistribution terms are gathered in the `copyright' file.
- */
-
-/*
- * IMPORTS_START
- * IMPORT browser
- * IMPORTS_END
- */
-
-var listeners = {};
-
-/* magic should be one of the constants from /common/connection_types.js */
-
-function listen_for_connection(magic, cb)
-{
- listeners[magic] = cb;
-}
-
-function raw_listen(port)
-{
- if (listeners[port.name] === undefined)
- return;
-
- listeners[port.name](port);
-}
-
-browser.runtime.onConnect.addListener(raw_listen);
-
-/*
- * EXPORTS_START
- * EXPORT listen_for_connection
- * EXPORTS_END
- */