aboutsummaryrefslogtreecommitdiff
path: root/background
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2021-12-08 19:01:50 +0100
committerWojtek Kosior <koszko@koszko.org>2021-12-08 19:01:50 +0100
commit3a90084ec14a15d9b76fa4bfed9e85f15a09dad7 (patch)
tree0e588240ff95f47c4387a82d1dcc59bda2a8d79a /background
parentc8fa3926b9ae2f837fcd6950e10e0852d89c4120 (diff)
downloadbrowser-extension-3a90084ec14a15d9b76fa4bfed9e85f15a09dad7.tar.gz
browser-extension-3a90084ec14a15d9b76fa4bfed9e85f15a09dad7.zip
facilitate initialization of IndexedDB for use by Haketilo
Diffstat (limited to 'background')
-rw-r--r--background/main.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/background/main.js b/background/main.js
index a4d3f0e..2809334 100644
--- a/background/main.js
+++ b/background/main.js
@@ -3,7 +3,8 @@
*
* Function: Main background script.
*
- * Copyright (C) 2021 Wojtek Kosior
+ * Copyright (C) 2021 Wojtek Kosior <koszko@koszko.org>
+ * Copyright (C) 2021 Jahoti <jahoti@envs.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -43,6 +44,7 @@
/*
* IMPORTS_START
+ * IMPORT initial_data
* IMPORT TYPE_PREFIX
* IMPORT get_storage
* IMPORT light_storage
@@ -70,13 +72,8 @@ async function init_ext(install_details)
await storage.clear();
- /*
- * Below we add sample settings to the extension.
- */
-
- for (let setting of // The next line is replaced with the contents of /default_settings.json by the build script
- `DEFAULT SETTINGS`
- ) {
+ /* Below we add sample settings to the extension. */
+ for (let setting of initial_data) {
let [key, value] = Object.entries(setting)[0];
storage.set(key[0], key.substring(1), value);
}