diff --git a/background/background.js b/background/background.js index 24631a52..95679239 100644 --- a/background/background.js +++ b/background/background.js @@ -155,12 +155,6 @@ addAPI(/** @namespace API */ { getValues: () => prefs.__values, // will be deepCopy'd by apiHandler set: prefs.set, }, - - /** - * Storage for big items that may exceed 8kB limit of chrome.storage.sync. - * To make an item syncable register it with uuidIndex.addCustomId. - */ - prefsDb: db.open(prefs.STORAGE_KEY), }); //#endregion diff --git a/background/db.js b/background/db.js index 32f405f1..ca541f01 100644 --- a/background/db.js +++ b/background/db.js @@ -1,5 +1,7 @@ +/* global addAPI */// common.js /* global chromeLocal */// storage-util.js /* global cloneError */// worker-util.js +/* global prefs */ 'use strict'; /* @@ -29,6 +31,13 @@ const db = (() => { dbName === DB ? 'styles' : 'data'; + addAPI(/** @namespace API */ { + /** + * Storage for big items that may exceed 8kB limit of chrome.storage.sync. + * To make an item syncable register it with uuidIndex.addCustomId. + */ + prefsDb: getProxy(prefs.STORAGE_KEY), + }); return { styles: getProxy(), open: getProxy,