Skip to content

Commit

Permalink
fix: change generated subtitles
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel2B committed Jul 2, 2022
1 parent 7771d72 commit 6193b51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/extension/modules/subtitles.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,10 @@ export async function translateSubtitles() {
}

// everything will work if the automatic translation button is at the end
subtituleItems[subtituleItems.length - 1].click();
const lastIndexItem = subtituleItems.length - 1;
const offset = subtituleItems[lastIndexItem].textContent.includes('>>') ? 1 : 0;

subtituleItems[lastIndexItem - offset].click();
}

await delay(0);
Expand Down

0 comments on commit 6193b51

Please sign in to comment.