semi
This commit is contained in:
1 parent
e5023e7709
commit
08b87afb12
2 files changed
+4
-4
No files matched your search
+3
-3
@@ -1,8 +1,8 @@
|
||||
import { state } from "./store/play";
|
||||
import { state } from "./store/play"
|
||||
|
||||
|
||||
function play() {
|
||||
const synth = window.speechSynthesis;
|
||||
const synth = window.speechSynthesis
|
||||
|
||||
const a = document.querySelector("article")
|
||||
if (!a || !a.textContent) {
|
||||
@@ -10,7 +10,7 @@ function play() {
|
||||
}
|
||||
|
||||
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) {
|
||||
u.voice = voice
|
||||
}
|
||||
|
||||
+1
-1
@@ -141,6 +141,6 @@ const unsubscribe = subscribe(theme, () => {
|
||||
})
|
||||
if (theme.theme === "contrast") {
|
||||
document.body.classList.add("theme-contrast")
|
||||
document.body.classList.add(theme.colorScheme);
|
||||
document.body.classList.add(theme.colorScheme)
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user