From 5ddbb0373f93632109458725e0f18f1fc75ff643 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Thu, 5 Sep 2019 19:56:29 -0400 Subject: Add function to create default options --- ext/bg/js/options.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 976f8e55..be27f71f 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -183,8 +183,8 @@ function optionsFieldTemplates() { `.trim(); } -function optionsSetDefaults(options) { - const defaults = { +function optionsCreateDefaults() { + return { general: { enable: true, audioSource: 'jpod101', @@ -238,6 +238,10 @@ function optionsSetDefaults(options) { fieldTemplates: optionsFieldTemplates() } }; +} + +function optionsSetDefaults(options) { + const defaults = optionsCreateDefaults(); const combine = (target, source) => { for (const key in source) { -- cgit v1.2.3