aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/generic-setting-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-16 10:22:24 -0500
committerGitHub <noreply@github.com>2021-01-16 10:22:24 -0500
commit8766744aa4a94193dd03bba39086e4522914e8ef (patch)
treebfb4a15e264c1fa4f9740bbd763a255e164a51e1 /ext/bg/js/settings/generic-setting-controller.js
parentdc4d659184a61a55083e201438bff7732acece1b (diff)
Popup window options (#1245)
* Add popupWindow options * Add toBoolean converter * Add settings * Use new options * Add test link * Fix window state not working * Make the window section advanced only
Diffstat (limited to 'ext/bg/js/settings/generic-setting-controller.js')
-rw-r--r--ext/bg/js/settings/generic-setting-controller.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/bg/js/settings/generic-setting-controller.js b/ext/bg/js/settings/generic-setting-controller.js
index 0d24c429..7d6fc2e6 100644
--- a/ext/bg/js/settings/generic-setting-controller.js
+++ b/ext/bg/js/settings/generic-setting-controller.js
@@ -36,6 +36,7 @@ class GenericSettingController {
['splitTags', this._splitTags.bind(this)],
['joinTags', this._joinTags.bind(this)],
['toNumber', this._toNumber.bind(this)],
+ ['toBoolean', this._toBoolean.bind(this)],
['toString', this._toString.bind(this)],
['conditionalConvert', this._conditionalConvert.bind(this)]
]);
@@ -206,6 +207,10 @@ class GenericSettingController {
return DOMDataBinder.convertToNumber(value, constraints);
}
+ _toBoolean(value) {
+ return (value === 'true');
+ }
+
_toString(value) {
return `${value}`;
}