Skip to content

Commit

Permalink
fix(Codeforces): 修复Google 翻译结果为空的问题
Browse files Browse the repository at this point in the history
fix #11, fix #12
  • Loading branch information
beijixiaohu committed Dec 15, 2023
1 parent 9324ee9 commit 32df790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/Codeforces Better!.js
Original file line number Diff line number Diff line change
Expand Up @@ -9279,7 +9279,7 @@ async function translate_gg(raw) {
url: `${url}?${params}`,
onload: function (response) {
const html = response.responseText;
const translatedText = $(html).find('.result-container').text();
const translatedText = $(html).filter('.result-container').text() || $(html).find('.result-container').text();
resolve(translatedText);
},
onerror: function (response) {
Expand Down

0 comments on commit 32df790

Please sign in to comment.