DeepL selector traslation text fix

This commit is contained in:
Blu3train 2023-09-27 18:57:36 +02:00
parent c6b52b6886
commit 916b2c87b6

View File

@ -167,7 +167,7 @@ std::pair<bool, std::wstring> Translate(const std::wstring& text, TranslationPar
for (int retry = 0; ++retry < 100; Sleep(100))
if (auto translation = Copy(DevTools::SendRequest("Runtime.evaluate",
LR"({"expression":"document.querySelector('.lmt__side_container--target [data-testid=translator-target-input]').textContent.trim() ","returnByValue":true})"
LR"({"expression":"document.querySelector('[data-testid=translator-target-input]').textContent.trim() ","returnByValue":true})"
)[L"result"][L"value"].String())) if (!translation->empty()) return { true, htmlDecode(translation.value()) };
if (auto errorMessage = Copy(DevTools::SendRequest("Runtime.evaluate",
LR"({"expression":"document.querySelector('div.lmt__system_notification').innerHTML","returnByValue":true})"