Skip to content

Commit

Permalink
fix: fix deepl.com DOM parsing again
Browse files Browse the repository at this point in the history
  • Loading branch information
marisukukise committed Sep 26, 2023
1 parent a61cdd5 commit 768aef9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/boxes/deepl/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ document.onreadystatechange = function () {
}, 8000);
} else {
const connectionCheck = setTimeout(() => {
if (document.querySelector('section[aria-labelledby="text-translator-section-heading"]')) {
if (document.querySelector('div#panelTranslateText')) {
ipcRenderer.send("deepLConnected");
clearInterval(connectionCheck);
}
Expand All @@ -98,13 +98,11 @@ document.onreadystatechange = function () {

try {
const targetNode = document.body.querySelector(
'div[aria-labelledby="translation-target-heading"]'
'div[aria-labelledby="translation-results-heading"]'
);
const sourceNode = document.body.querySelector(
'div[aria-labelledby="translation-source-heading"]'
);
console.log("e");
console.log(targetNode, sourceNode)

const config = { childList: true };
const callback = () => {
Expand Down

0 comments on commit 768aef9

Please sign in to comment.