aboutsummaryrefslogtreecommitdiff
path: root/common/storage_client.js
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2021-08-14 10:07:28 +0200
committerWojtek Kosior <koszko@koszko.org>2021-08-14 10:07:28 +0200
commit443bc095a72949adb4a007c9a19a43da7dd8843d (patch)
tree4b3e392057d8939961a3e707ae596cd85e6fa623 /common/storage_client.js
parentae1844f9ac935eb3c89314cd402b4ec2c3d0f537 (diff)
parent2fbab2f07d3cebde1fba0e801df4f3e9129e463b (diff)
downloadbrowser-extension-443bc095a72949adb4a007c9a19a43da7dd8843d.tar.gz
browser-extension-443bc095a72949adb4a007c9a19a43da7dd8843d.zip
merge facility to install from Hydrilla
Diffstat (limited to 'common/storage_client.js')
-rw-r--r--common/storage_client.js17
1 files changed, 3 insertions, 14 deletions
diff --git a/common/storage_client.js b/common/storage_client.js
index 4849a65..2b2f495 100644
--- a/common/storage_client.js
+++ b/common/storage_client.js
@@ -8,7 +8,6 @@
/*
* IMPORTS_START
* IMPORT CONNECTION_TYPE
- * IMPORT TYPE_PREFIX
* IMPORT list_prefixes
* IMPORT make_once
* IMPORT browser
@@ -47,20 +46,10 @@ function handle_message(message)
setTimeout(resolve, 0, message.result);
}
-function list(name, prefix)
-{
- return {prefix, name, listeners : new Set()};
-}
-
-var scripts = list("scripts", TYPE_PREFIX.SCRIPT);
-var bags = list("bags", TYPE_PREFIX.BAG);
-var pages = list("pages", TYPE_PREFIX.PAGE);
+const list_by_prefix = {};
-const list_by_prefix = {
- [TYPE_PREFIX.SCRIPT] : scripts,
- [TYPE_PREFIX.BAG] : bags,
- [TYPE_PREFIX.PAGE] : pages
-};
+for (const prefix of list_prefixes)
+ list_by_prefix[prefix] = {prefix, listeners : new Set()};
var resolve_init;