Skip to content

Commit

Permalink
refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
ttop32 committed Jan 28, 2024
1 parent a1b39b3 commit 1af1c32
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/contentScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ async function translateWriting() {
// if is google doc do not check writing box
if (
!keyDownList[setting["keyDownTranslateWriting"]] ||
(!util.getFocusedWritingBox() && !util.isGoogleDoc())
!util.getFocusedWritingBox()
) {
return;
}
Expand Down Expand Up @@ -351,14 +351,7 @@ async function makeNonEnglishTypingFinish() {
async function insertText(text) {
if (!text) {
return;
} else if (util.isGoogleDoc()) {
pasteTextGoogleDoc(text);
} else {
pasteTextDom(text);
}
}

async function pasteTextDom(text) {
pasteTextInputBox(text);
await delay(10);
if (hasSelection()) {
Expand Down

0 comments on commit 1af1c32

Please sign in to comment.