Project

General

Profile

« Previous | Next » 

Revision 5c685518

Added by koszko about 2 years ago

store repository URLs in settings

View differences:

background/storage_server.js
9 9
 * IMPORTS_START
10 10
 * IMPORT listen_for_connection
11 11
 * IMPORT get_storage
12
 * IMPORT TYPE_PREFIX
12
 * IMPORT list_prefixes
13 13
 * IMPORT CONNECTION_TYPE
14 14
 * IMPORTS_END
15 15
 */
......
38 38
{
39 39
    console.log("new remote storage connection!");
40 40

  
41
    port.postMessage({
42
	[TYPE_PREFIX.SCRIPT] : storage.get_all(TYPE_PREFIX.SCRIPT),
43
	[TYPE_PREFIX.BAG] : storage.get_all(TYPE_PREFIX.BAG),
44
	[TYPE_PREFIX.PAGE] : storage.get_all(TYPE_PREFIX.PAGE)
45
    });
41
    const message = {};
42
    for (const prefix of list_prefixes)
43
	message[prefix] = storage.get_all(prefix);
44

  
45
    port.postMessage(message);
46 46

  
47 47
    let handle_change = change => port.postMessage(change);
48 48

  

Also available in: Unified diff