Skip to content

Commit

Permalink
fix: adjust audio file paths for non-production environments
Browse files Browse the repository at this point in the history
  • Loading branch information
lyricat committed Mar 4, 2025
1 parent 295d971 commit 24d8563
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ function convertToInlineComponent(el) {
const dataAudio = fillDataAudio(el);
console.log('inline component', dataAudio)
// check the hostname.
// if the hostname is not `1000h.org`, add `/1000-hours` to the dataAudio[i].value
if (window.location.hostname !== '1000h.org' || window.location.hostname !== 'localhost') {
for (let i = 0; i < dataAudio.length; i++) {
if (dataAudio[i].value) {
dataAudio[i].value = `/1000-hours${dataAudio[i].value}`;
}
}
}
const wrapperEl = document.createElement('div')
wrapperEl.classList.add('speak-word-wrapper')
const canEl = document.createElement('div')
Expand Down

0 comments on commit 24d8563

Please sign in to comment.