chore(rework): 제거된 버튼의 잔여 안내문구·죽은 JS 정리

URL자막 버튼 제거에 따라 안내문/placeholder의 'URL자막' 언급 삭제,
미사용 함수 extractScript/translateToEditor 제거(copyToEditor는 유지).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
hehihoho3@gmail.com 2026-06-26 09:49:00 +09:00
parent 0decc4439c
commit 279cb4c9d0

View File

@ -69,7 +69,7 @@
<div class="help-item"> <div class="help-item">
<div class="hi-ic"><i data-lucide="upload"></i></div> <div class="hi-ic"><i data-lucide="upload"></i></div>
<div><div class="hi-t">영상 업로드 · 자막 추출</div><div class="hi-d">영상 파일을 올리면 <b>Whisper</b>가 말소리를 <b>시간 싱크 자막</b>으로 추출합니다. 언어는 자동감지(틀리면 옆에서 ko/en/zh/ja 선택). URL자막은 YouTube 자막을 평문으로(시간 없음) 가져옵니다.</div></div> <div><div class="hi-t">영상 업로드 · 자막 추출</div><div class="hi-d">영상 파일을 올리면 <b>Whisper</b>가 말소리를 <b>시간 싱크 자막</b>으로 추출합니다. 언어는 자동감지(틀리면 옆에서 ko/en/zh/ja 선택).</div></div>
</div> </div>
<div class="help-item"> <div class="help-item">
<div class="hi-ic"><i data-lucide="list-video"></i></div> <div class="hi-ic"><i data-lucide="list-video"></i></div>
@ -164,7 +164,7 @@
<div id="segmentList" style="display:none; max-height:340px; overflow:auto; border:1px solid var(--glass-border); border-radius:var(--radius-md); background:var(--surface-2);"></div> <div id="segmentList" style="display:none; max-height:340px; overflow:auto; border:1px solid var(--glass-border); border-radius:var(--radius-md); background:var(--surface-2);"></div>
<!-- 평문 폴백 (URL 자막 추출 시) --> <!-- 평문 폴백 (URL 자막 추출 시) -->
<textarea id="transcript" readonly placeholder="영상 업로드·자막 추출’로 영상에서 싱크된 자막을 추출하거나, URL자막으로 YouTube 자막을 가져오세요." <textarea id="transcript" readonly placeholder="원본 다운로드’ 또는 영상 업로드·자막 추출’로 영상에서 시간 싱크된 자막을 추출하세요."
style="width:100%; min-height:140px; resize:vertical; padding:12px; background:var(--surface-2); border:1px solid var(--glass-border); border-radius:var(--radius-md); color:var(--text-2); outline:none; font-size:0.9rem; line-height:1.6;"></textarea> style="width:100%; min-height:140px; resize:vertical; padding:12px; background:var(--surface-2); border:1px solid var(--glass-border); border-radius:var(--radius-md); color:var(--text-2); outline:none; font-size:0.9rem; line-height:1.6;"></textarea>
<!-- 내보내기 (배속 + 말 없는 구간 제거 + SRT/영상) --> <!-- 내보내기 (배속 + 말 없는 구간 제거 + SRT/영상) -->
@ -785,17 +785,6 @@
if(window.lucide) lucide.createIcons(); if(window.lucide) lucide.createIcons();
} }
async function extractScript(){
const btn = document.getElementById('extractBtn');
const orig = btn.innerHTML; btn.disabled = true; btn.innerHTML = '추출 중...';
try {
const s = await api(API + '/' + VIDEO_ID + '/extract-script', { method:'POST' });
document.getElementById('transcript').value = s.transcript || '';
if(!s.transcript) alert('자막을 가져오지 못했습니다. (영상에 자막이 없거나 외부 서비스 차단)');
} catch(e){ alert('추출 실패: ' + e.message); }
finally { btn.disabled = false; btn.innerHTML = orig; if(window.lucide) lucide.createIcons(); }
}
function copyToEditor(){ function copyToEditor(){
const t = document.getElementById('transcript').value; const t = document.getElementById('transcript').value;
if(!t){ alert('복사할 스크립트가 없습니다.'); return; } if(!t){ alert('복사할 스크립트가 없습니다.'); return; }
@ -803,24 +792,6 @@
ed.value = ed.value ? (ed.value + '\n\n' + t) : t; ed.value = ed.value ? (ed.value + '\n\n' + t) : t;
} }
// 원본 스크립트를 한국어로 번역해 '재작성(내 버전)' 칸에 넣는다.
// format: 'plain'(평문 흐름) | 'timeline'([00:00] 세그먼트별 줄)
async function translateToEditor(format){
const tl = format === 'timeline';
const btn = document.getElementById(tl ? 'translateTlBtn' : 'translateBtn');
const orig = btn.innerHTML; btn.disabled = true; btn.innerHTML = '번역 중…';
try {
const url = API + '/' + VIDEO_ID + '/translate?target=ko' + (tl ? '&format=timeline' : '');
const r = await api(url, { method:'POST' });
const t = (r && r.translatedText) || '';
if(!t){ alert('번역 결과가 비었습니다. (원본 스크립트' + (tl ? '/세그먼트' : '') + '가 있는지 확인하세요)'); return; }
const ed = document.getElementById('reworkText');
ed.value = ed.value ? (ed.value + '\n\n' + t) : t;
ed.focus();
} catch(e){ alert('번역 실패: ' + e.message); }
finally { btn.disabled = false; btn.innerHTML = orig; if(window.lucide) lucide.createIcons(); }
}
async function saveRework(){ async function saveRework(){
const btn = document.getElementById('saveBtn'); const btn = document.getElementById('saveBtn');
const orig = btn.innerHTML; btn.disabled = true; btn.innerHTML = '저장 중...'; const orig = btn.innerHTML; btn.disabled = true; btn.innerHTML = '저장 중...';