diff options
author | Wojtek Kosior <koszko@koszko.org> | 2021-08-14 10:07:28 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2021-08-14 10:07:28 +0200 |
commit | 443bc095a72949adb4a007c9a19a43da7dd8843d (patch) | |
tree | 4b3e392057d8939961a3e707ae596cd85e6fa623 /background/storage_server.js | |
parent | ae1844f9ac935eb3c89314cd402b4ec2c3d0f537 (diff) | |
parent | 2fbab2f07d3cebde1fba0e801df4f3e9129e463b (diff) | |
download | browser-extension-443bc095a72949adb4a007c9a19a43da7dd8843d.tar.gz browser-extension-443bc095a72949adb4a007c9a19a43da7dd8843d.zip |
merge facility to install from Hydrilla
Diffstat (limited to 'background/storage_server.js')
-rw-r--r-- | background/storage_server.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/background/storage_server.js b/background/storage_server.js index 554aff2..2252eb5 100644 --- a/background/storage_server.js +++ b/background/storage_server.js @@ -9,7 +9,7 @@ * IMPORTS_START * IMPORT listen_for_connection * IMPORT get_storage - * IMPORT TYPE_PREFIX + * IMPORT list_prefixes * IMPORT CONNECTION_TYPE * IMPORTS_END */ @@ -38,11 +38,11 @@ function new_connection(port) { console.log("new remote storage connection!"); - port.postMessage({ - [TYPE_PREFIX.SCRIPT] : storage.get_all(TYPE_PREFIX.SCRIPT), - [TYPE_PREFIX.BAG] : storage.get_all(TYPE_PREFIX.BAG), - [TYPE_PREFIX.PAGE] : storage.get_all(TYPE_PREFIX.PAGE) - }); + const message = {}; + for (const prefix of list_prefixes) + message[prefix] = storage.get_all(prefix); + + port.postMessage(message); let handle_change = change => port.postMessage(change); |