aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/main.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-22 13:50:30 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-01-24 20:15:25 -0500
commit4415a71ae296555443b7835537c653cf35edc933 (patch)
tree5a346cca876bab82b767f6305fc7d93a94aaae78 /ext/bg/js/settings/main.js
parent9ae87f186a8ecbae3f727bcff8782ba3b0d6ba53 (diff)
Add translation options
Diffstat (limited to 'ext/bg/js/settings/main.js')
-rw-r--r--ext/bg/js/settings/main.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js
index ac255978..2130dd5a 100644
--- a/ext/bg/js/settings/main.js
+++ b/ext/bg/js/settings/main.js
@@ -72,6 +72,11 @@ async function formRead(options) {
options.scanning.modifier = $('#scan-modifier-key').val();
options.scanning.popupNestingMaxDepth = parseInt($('#popup-nesting-max-depth').val(), 10);
+ options.translation.convertKatakanaToHiragana = $('#translation-convert-katakana-to-hiragana').val();
+ options.translation.convertHalfWidthCharacters = $('#translation-convert-half-width-characters').val();
+ options.translation.convertNumericCharacters = $('#translation-convert-numeric-characters').val();
+ options.translation.convertAlphabeticCharacters = $('#translation-convert-alphabetic-characters').val();
+
options.parsing.enableScanningParser = $('#parsing-scan-enable').prop('checked');
options.parsing.enableMecabParser = $('#parsing-mecab-enable').prop('checked');
options.parsing.readingMode = $('#parsing-reading-mode').val();
@@ -140,6 +145,11 @@ async function formWrite(options) {
$('#scan-modifier-key').val(options.scanning.modifier);
$('#popup-nesting-max-depth').val(options.scanning.popupNestingMaxDepth);
+ $('#translation-convert-katakana-to-hiragana').val(options.translation.convertKatakanaToHiragana);
+ $('#translation-convert-half-width-characters').val(options.translation.convertHalfWidthCharacters);
+ $('#translation-convert-numeric-characters').val(options.translation.convertNumericCharacters);
+ $('#translation-convert-alphabetic-characters').val(options.translation.convertAlphabeticCharacters);
+
$('#parsing-scan-enable').prop('checked', options.parsing.enableScanningParser);
$('#parsing-mecab-enable').prop('checked', options.parsing.enableMecabParser);
$('#parsing-reading-mode').val(options.parsing.readingMode);