11import TextUtil from "/src/util/text_util.js" ;
22import { langList , ocrLangList , listenLangList } from "/src/util/lang.js" ;
33import _util from "/src/util/lodash_util.js" ;
4+ var browser ;
5+ try {
6+ browser = require ( "webextension-polyfill" ) ;
7+ } catch ( error ) { }
48
59var langListWithAuto = TextUtil . concatJson ( { Auto : "auto" } , langList ) ; //copy lang and add auto
610var langListWithNone = TextUtil . concatJson ( { None : "null" } , langList ) ; //copy lang and add none
@@ -128,12 +132,6 @@ var voiceRateListWithDefault = TextUtil.concatJson(defaultDict, voiceRateList);
128132export var settingDict = {
129133 // main
130134
131- translateWhen : {
132- default : "mouseoverselect" ,
133- i18nKey : "Translate_When" ,
134- optionList : translateActionList ,
135- settingTab : "main" ,
136- } ,
137135 translateSource : {
138136 default : "auto" ,
139137 i18nKey : "Translate_From" ,
@@ -152,6 +150,12 @@ export var settingDict = {
152150 optionList : translatorList ,
153151 settingTab : "main" ,
154152 } ,
153+ translateWhen : {
154+ default : "mouseoverselect" ,
155+ i18nKey : "Translate_When" ,
156+ optionList : translateActionList ,
157+ settingTab : "main" ,
158+ } ,
155159 mouseoverTextType : {
156160 default : "sentence" ,
157161 i18nKey : "Mouseover_Text_Type" ,
0 commit comments