diff options
author | Wojtek Kosior <koszko@koszko.org> | 2021-07-21 17:42:21 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2021-07-21 17:42:21 +0200 |
commit | 5c68551800e477db41ae6fe3a318b2ff2d7a9cb1 (patch) | |
tree | 9b0cf5b8c35b00cdbb4fdd25579c68c1b91cc6b4 /background | |
parent | fb9c808cdaa46833c0cbd7f6c918d6b61aec1aca (diff) | |
download | browser-extension-5c68551800e477db41ae6fe3a318b2ff2d7a9cb1.tar.gz browser-extension-5c68551800e477db41ae6fe3a318b2ff2d7a9cb1.zip |
store repository URLs in settings
Diffstat (limited to 'background')
-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); |