Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update get audio scripts #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions get_audio_url.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
btn = document.getElementsByClassName('sound audio_play_button pron-uk icon-audio')[0]
copy(btn.getAttribute('data-src-mp3'))
42 changes: 34 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,34 @@
width: 100%;
height: 2rem;
}
.result-text > div > h1 {

.result-text>div>h1 {
color: #1A3561;
margin: 0;
}
.result-text > div {

.result-text>div {
display: flex;
justify-content: center;
align-items: baseline;
gap: 0.5rem;
}

.image-container {
/* display: flex;
flex-direction: column; */

margin: auto;
text-align: center;
font-style: italic;
}

.caption {
width: 100%;
height: 4rem;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

<body>
Expand Down Expand Up @@ -206,9 +224,16 @@ <h2>Example</h2>
</ul>
</div>
</div>
<div class="image">
<img src="https://www.shutterstock.com/image-illustration/examine-study-definition-showed-magnify-260nw-1966457662.jpg"
alt="The image demonstrates the word.">
<div class="image-container">
<div class="image">
<img src="https://www.shutterstock.com/image-illustration/examine-study-definition-showed-magnify-260nw-1966457662.jpg"
alt="The image demonstrates the word.">
</div>
<div class="caption">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been
the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley
of type and scrambled it to make a type specimen book.
</div>
</div>
</div>
</body>
Expand All @@ -219,8 +244,9 @@ <h2>Example</h2>
}

function soundBtnOnClick() {
var url = document.querySelector('[data-src-mp3]').dataset.srcMp3
playSound(url)
var url = document.querySelector('[data-src-mp3]').dataset.srcMp3;
url = url.replaceAll("'", "")
playSound(url);
}

const word = document.getElementById('cloze').innerHTML;
Expand Down Expand Up @@ -258,7 +284,7 @@ <h2>Example</h2>
value += '_';
}
}

if (value.length > 20) {
value = value.slice(0, 19);
}
Expand Down