Mercurial Hosting > lang
diff src/site.js @ 16:f5425a3c1898
add languages
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 30 Jul 2025 10:38:27 -0600 |
parents | 2d4b3f003ec2 |
children | 99b71a377f2c |
line wrap: on
line diff
--- a/src/site.js Tue Jul 29 20:59:47 2025 -0600 +++ b/src/site.js Wed Jul 30 10:38:27 2025 -0600 @@ -138,7 +138,8 @@ rt.remove(); } //console.log(mdDiv.textContent); - text += `\n<p><audio controls preload=none src="/tts.mp3?text=${encodeURIComponent(mdDiv.textContent)}"></p>\n`; + let lang = div.getAttribute('lang'); + text += `\n<p><audio controls preload=none src="/tts.mp3?lang=${lang}&text=${encodeURIComponent(mdDiv.textContent)}"></p>\n`; } div.innerHTML = text; div.removeAttribute('markdown');