Skip to main content

Udemy 번역 스크립트

Udemy 강의 자막을 크롬 번역과 연동해 자동으로 번역해 보여 주는 브라우저 콘솔 스크립트입니다. 개발자 도구에서 한 번 실행하면 재생 중인 자막을 실시간으로 바꿔 줍니다.

Kyungmin Park

  1. 크롬 번역 활성화
  2. 개발자도구(F12) 실행
  3. console 진입
  4. 스크립트 실행
setInterval(() => {
  const toEl = document.querySelector('div[data-purpose="captions-cue-text"]');
  const fromEl = document.querySelector('p[data-purpose="transcript-cue-active"] span');  if (toEl && fromEl) {
    const currentText = fromEl.innerText;
    if (toEl.innerText !== currentText) {
      toEl.innerText = currentText;
    }
  }
}, 200);