From 768aef9bf85e235ca3c3ae3ed2c4c38db743be09 Mon Sep 17 00:00:00 2001 From: Marisu Kukise <109931938+marisukukise@users.noreply.github.com> Date: Tue, 26 Sep 2023 18:35:48 +0200 Subject: [PATCH] fix: fix deepl.com DOM parsing again --- src/boxes/deepl/script.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/boxes/deepl/script.js b/src/boxes/deepl/script.js index 5a4a47a..4646ac7 100644 --- a/src/boxes/deepl/script.js +++ b/src/boxes/deepl/script.js @@ -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); } @@ -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 = () => {