v68: тест — жёсткие слоги Buon·gior·no с ярким hover (жёлтый)

This commit is contained in:
“Naeel”
2026-05-22 18:59:28 +04:00
parent 60749a9691
commit ceebfc5d58
2 changed files with 50 additions and 2 deletions
+25 -1
View File
@@ -666,7 +666,7 @@ async function doCompare(blob, originalText, duration) {
<script> <script>
// ---------- Глобальные переменные и инициализация ---------- // ---------- Глобальные переменные и инициализация ----------
const GROQ_API_KEY = ''; const GROQ_API_KEY = '';
const VERSION = 'v67'; const VERSION = 'v68';
let mediaRecorder, audioChunks = [], userAudioBlob = null, ttsText = ''; let mediaRecorder, audioChunks = [], userAudioBlob = null, ttsText = '';
let isRecording = false, isAnalyzing = false, micAnalyser = null, micAnimId = null; let isRecording = false, isAnalyzing = false, micAnalyser = null, micAnimId = null;
@@ -675,6 +675,30 @@ let recordStartTime = 0, recordDuration = 0;
function setStatus(msg) { document.getElementById('status').textContent = msg; } function setStatus(msg) { document.getElementById('status').textContent = msg; }
function enable(id, val) { document.getElementById(id).disabled = !val; } function enable(id, val) { document.getElementById(id).disabled = !val; }
// ---------- ТЕСТ: жёсткие слоги при загрузке (только hover) ----------
(function testSylHover() {
const div = document.getElementById('syllables');
if (!div) return;
const syls = ['Buon','gior','no'];
const wrap = document.createElement('div');
wrap.style.cssText = 'margin-top:8px;font-size:1.4em;letter-spacing:3px;user-select:none';
syls.forEach((s, i) => {
if (i > 0) {
const sep = document.createElement('span');
sep.style.cssText = 'color:#aaa;margin:0 2px';
sep.textContent = '·';
wrap.appendChild(sep);
}
const chip = document.createElement('span');
chip.textContent = s;
chip.style.cssText = 'cursor:pointer;padding:3px 8px;border-radius:6px;border:1px solid #ccc';
chip.onmouseenter = function() { this.style.background = '#ffeb3b'; this.style.borderColor = '#f9a825'; };
chip.onmouseleave = function() { this.style.background = ''; this.style.borderColor = '#ccc'; };
wrap.appendChild(chip);
});
div.appendChild(wrap);
})();
// ---------- Инициализация ---------- // ---------- Инициализация ----------
document.getElementById('ver').textContent = VERSION; document.getElementById('ver').textContent = VERSION;
renderHistory(); renderHistory();
+25 -1
View File
@@ -1,6 +1,6 @@
// ---------- Глобальные переменные и инициализация ---------- // ---------- Глобальные переменные и инициализация ----------
const GROQ_API_KEY = ''; const GROQ_API_KEY = '';
const VERSION = 'v67'; const VERSION = 'v68';
let mediaRecorder, audioChunks = [], userAudioBlob = null, ttsText = ''; let mediaRecorder, audioChunks = [], userAudioBlob = null, ttsText = '';
let isRecording = false, isAnalyzing = false, micAnalyser = null, micAnimId = null; let isRecording = false, isAnalyzing = false, micAnalyser = null, micAnimId = null;
@@ -9,6 +9,30 @@ let recordStartTime = 0, recordDuration = 0;
function setStatus(msg) { document.getElementById('status').textContent = msg; } function setStatus(msg) { document.getElementById('status').textContent = msg; }
function enable(id, val) { document.getElementById(id).disabled = !val; } function enable(id, val) { document.getElementById(id).disabled = !val; }
// ---------- ТЕСТ: жёсткие слоги при загрузке (только hover) ----------
(function testSylHover() {
const div = document.getElementById('syllables');
if (!div) return;
const syls = ['Buon','gior','no'];
const wrap = document.createElement('div');
wrap.style.cssText = 'margin-top:8px;font-size:1.4em;letter-spacing:3px;user-select:none';
syls.forEach((s, i) => {
if (i > 0) {
const sep = document.createElement('span');
sep.style.cssText = 'color:#aaa;margin:0 2px';
sep.textContent = '·';
wrap.appendChild(sep);
}
const chip = document.createElement('span');
chip.textContent = s;
chip.style.cssText = 'cursor:pointer;padding:3px 8px;border-radius:6px;border:1px solid #ccc';
chip.onmouseenter = function() { this.style.background = '#ffeb3b'; this.style.borderColor = '#f9a825'; };
chip.onmouseleave = function() { this.style.background = ''; this.style.borderColor = '#ccc'; };
wrap.appendChild(chip);
});
div.appendChild(wrap);
})();
// ---------- Инициализация ---------- // ---------- Инициализация ----------
document.getElementById('ver').textContent = VERSION; document.getElementById('ver').textContent = VERSION;
renderHistory(); renderHistory();