Skip to content

Commit e785acf

Browse files
committed
Fix cindy clock url
1 parent 837ab16 commit e785acf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cindy/Day2-clock/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ const setDate = () => {
3333
}
3434

3535
chickHead.addEventListener('click', () => {
36-
audio.src = `https://translate.google.com/translate_tts?ie=UTF-8&total=1&idx=0&textlen=32&client=tw-ob&q=${time.innerText}&tl=en-gb`
37-
audio.autoplay = 'autoplay'
36+
audio.src = encodeURI(`https://translate.google.com/translate_tts?ie=UTF-8&total=1&idx=0&textlen=32&client=tw-ob&q=${time.innerText}&tl=en-gb`);
37+
audio.autoplay = 'autoplay';
3838
});
3939

4040
setInterval(setDate, 10);

0 commit comments

Comments
 (0)