aboutsummaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/js/options-form.js2
-rw-r--r--ext/bg/js/options.js2
2 files changed, 3 insertions, 1 deletions
diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js
index 239b09d5..d515b789 100644
--- a/ext/bg/js/options-form.js
+++ b/ext/bg/js/options-form.js
@@ -40,7 +40,7 @@ function formToOptions(section, callback) {
switch (section) {
case 'general':
- optsNew.scanLength = $('#scan-length').val();
+ optsNew.scanLength = parseInt($('#scan-length').val());
optsNew.activateOnStartup = $('#activate-on-startup').prop('checked');
optsNew.loadEnamDict = $('#load-enamdict').prop('checked');
optsNew.selectMatchedText = $('#select-matched-text').prop('checked');
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index f131ab9b..0a5197f9 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -38,6 +38,8 @@ function sanitizeOptions(options) {
}
}
+ options.scanLength = parseInt(options.scanLength);
+
return options;
}