From 5c68551800e477db41ae6fe3a318b2ff2d7a9cb1 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 21 Jul 2021 17:42:21 +0200 Subject: store repository URLs in settings --- background/storage_server.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'background') 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); -- cgit v1.2.3