This commit is contained in:
tmshv committed 2025-08-25 21:59:39 +03:00
1 parent e5023e7709
commit 08b87afb12
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -1,8 +1,8 @@
import { state } from "./store/play"; import { state } from "./store/play"
function play() { function play() {
const synth = window.speechSynthesis; const synth = window.speechSynthesis
const a = document.querySelector("article") const a = document.querySelector("article")
if (!a || !a.textContent) { if (!a || !a.textContent) {
@@ -10,7 +10,7 @@ function play() {
} }
const u = new SpeechSynthesisUtterance(a.textContent) const u = new SpeechSynthesisUtterance(a.textContent)
const voice = synth.getVoices().find((v) => v.name === state.voice); const voice = synth.getVoices().find((v) => v.name === state.voice)
if (voice) { if (voice) {
u.voice = voice u.voice = voice
} }
+1 -1
View File
@@ -141,6 +141,6 @@ const unsubscribe = subscribe(theme, () => {
}) })
if (theme.theme === "contrast") { if (theme.theme === "contrast") {
document.body.classList.add("theme-contrast") document.body.classList.add("theme-contrast")
document.body.classList.add(theme.colorScheme); document.body.classList.add(theme.colorScheme)
} }
}) })