Skip to content

Commit df37ea3

Browse files
committed
move functions
1 parent 780c9b1 commit df37ea3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ function main(): void {
145145
"version",
146146
) as HTMLAnchorElement;
147147

148+
// determines whether the dictionary can be automatically parsed
149+
function autoParse(): boolean {
150+
return customDictionaryTextBox.value.length <=
151+
DICTIONARY_AUTO_PARSE_THRESHOLD;
152+
}
153+
148154
// emulates `window.alert`
149155
function showMessage(useMessage: string): void {
150156
message.innerText = useMessage;
@@ -334,10 +340,6 @@ function main(): void {
334340
}
335341
tryCloseDictionary();
336342
});
337-
function autoParse(): boolean {
338-
return customDictionaryTextBox.value.length <=
339-
DICTIONARY_AUTO_PARSE_THRESHOLD;
340-
}
341343
function updateDictionary(): void {
342344
currentDictionary = dictionaryParser.parse(customDictionaryTextBox.value);
343345
showDictionaryError();

0 commit comments

Comments
 (0)