Skip to content

Commit

Permalink
fix: ajusta boas praticas
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulloClara committed Mar 13, 2024
1 parent 004e107 commit d36de00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ function runBackgroundSoundScript() {
}
}

function switchBackgroundSoundByTheme(theme) {
async function switchBackgroundSoundByTheme(theme) {
try {
if ((await navigator.getAutoplayPolicy('mediaelement')) !== 'allowed') {
return
}

const backgroundSoundEl = document.querySelector('#pc-background-sound')
backgroundSoundEl.pause()
const currentSound = theme === 'day' ? 'sounds/hollow-knight.mp3' : 'sounds/radiance.mp3'
Expand Down
2 changes: 1 addition & 1 deletion styles/banner.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
font-size: 1.2em;
line-height: 1.4em;
text-align: justify;
transition: all 0.5s;
/* transition: all 0.5s; */
}

.pc-banner-background {
Expand Down

0 comments on commit d36de00

Please sign in to comment.