Project

General

Profile

« Previous | Next » 

Revision 3a90084e

Added by koszko over 1 year ago

facilitate initialization of IndexedDB for use by Haketilo

View differences:

background/main.js
3 3
 *
4 4
 * Function: Main background script.
5 5
 *
6
 * Copyright (C) 2021 Wojtek Kosior
6
 * Copyright (C) 2021 Wojtek Kosior <koszko@koszko.org>
7
 * Copyright (C) 2021 Jahoti <jahoti@envs.net>
7 8
 *
8 9
 * This program is free software: you can redistribute it and/or modify
9 10
 * it under the terms of the GNU General Public License as published by
......
43 44

  
44 45
/*
45 46
 * IMPORTS_START
47
 * IMPORT initial_data
46 48
 * IMPORT TYPE_PREFIX
47 49
 * IMPORT get_storage
48 50
 * IMPORT light_storage
......
70 72

  
71 73
    await storage.clear();
72 74

  
73
    /*
74
     * Below we add sample settings to the extension.
75
     */
76

  
77
    for (let setting of // The next line is replaced with the contents of /default_settings.json by the build script
78
        `DEFAULT SETTINGS`
79
    ) {
75
    /* Below we add sample settings to the extension. */
76
    for (let setting of initial_data) {
80 77
	let [key, value] = Object.entries(setting)[0];
81 78
	storage.set(key[0], key.substring(1), value);
82 79
    }

Also available in: Unified diff