diff --git a/dist/index.html b/dist/index.html index d7a5b54..c872bfc 100644 --- a/dist/index.html +++ b/dist/index.html @@ -49,6 +49,7 @@ button:disabled { background:#ccc; cursor:not-allowed; }
+ @@ -628,9 +629,11 @@ async function doCompare(blob, originalText, duration) { '🗣 Артикуляция: ' + phon.voiceClarity + '%' + ''; - // Слоги — кликабельные (DOM-элементы, не innerHTML) + // Слоги — в отдельный div, не в diff (diff перезаписывается) _currentBlob = blob; _currentSylBuf = null; + const sylDiv = document.getElementById('syllables'); + sylDiv.innerHTML = ''; const sy = syllabifyIT(originalText); if (sy && sy.includes('-')) { const syls = sy.split('-'); @@ -645,13 +648,13 @@ async function doCompare(blob, originalText, duration) { } const chip = document.createElement('span'); chip.textContent = s; - chip.style.cssText = 'cursor:pointer;padding:2px 4px;border-radius:4px;transition:background 0.15s'; - chip.onmouseover = () => { chip.style.background = '#e0e0ff'; }; + chip.style.cssText = 'cursor:pointer;padding:2px 6px;border-radius:4px;transition:background 0.1s'; + chip.onmouseover = () => { chip.style.background = '#d0d0ff'; }; chip.onmouseout = () => { chip.style.background = ''; }; - chip.onclick = () => { chip.style.background = '#b0b0ff'; setTimeout(() => { chip.style.background = '#e0e0ff'; }, 150); playSyllable(i, syls.length); }; + chip.onclick = () => { chip.style.background = '#a0a0ff'; setTimeout(() => { chip.style.background = '#d0d0ff'; }, 200); playSyllable(i, syls.length); }; div.appendChild(chip); }); - document.getElementById('diff').appendChild(div); + sylDiv.appendChild(div); } setStatus('Готово.'); @@ -663,7 +666,7 @@ async function doCompare(blob, originalText, duration) {