mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
fix
This commit is contained in:
parent
f7ede00f4b
commit
bd04bd443b
@ -2,25 +2,25 @@
|
|||||||
<div id="audio">{{audio}}</div>
|
<div id="audio">{{audio}}</div>
|
||||||
<div id="audio_sentence">{{audio_sentence}}</div>
|
<div id="audio_sentence">{{audio_sentence}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="centerdiv">
|
<div class="centerdiv" onclick='playAudio("audio")'>
|
||||||
<div id="rubyword" class="ruby-div" onclick='playAudio("audio")'></div>
|
<div class="ruby-div" id="word">{{ word }}</div>
|
||||||
|
<div id="rubyword" class="ruby-div"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
ruby = {{ rubytext }}
|
ruby = {{ rubytext }}
|
||||||
word = '{{ word }}'
|
|
||||||
html = ''
|
html = ''
|
||||||
if (ruby.length) {
|
if (ruby.length) {
|
||||||
for (i = 0; i < ruby.length; i++) {
|
for (i = 0; i < ruby.length; i++) {
|
||||||
html += ruby[i]['orig'] + '<rt>' + ruby[i]['hira'] + '</rt>';
|
html += ruby[i]['orig'] + '<rt>' + ruby[i]['hira'] + '</rt>';
|
||||||
}
|
}
|
||||||
html = '<ruby>' + html + '</ruby>'
|
html = '<ruby>' + html + '</ruby>'
|
||||||
|
document.getElementById('rubyword').innerHTML = html
|
||||||
|
document.getElementById('word').classList.add("hide-style");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
html = word
|
document.getElementById('rubyword').classList.add("hide-style");
|
||||||
}
|
}
|
||||||
document.getElementById('rubyword').innerHTML = html
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -2,25 +2,25 @@
|
|||||||
<div id="audio">{{audio}}</div>
|
<div id="audio">{{audio}}</div>
|
||||||
<div id="audio_sentence">{{audio_sentence}}</div>
|
<div id="audio_sentence">{{audio_sentence}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="centerdiv">
|
<div class="centerdiv" onclick='playAudio("audio")'>
|
||||||
<div id="rubyword" class="ruby-div" onclick='playAudio("audio")'></div>
|
<div class="ruby-div" id="word">{{ word }}</div>
|
||||||
|
<div id="rubyword" class="ruby-div"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
ruby = {{ rubytext }}
|
ruby = {{ rubytext }}
|
||||||
word = '{{ word }}'
|
|
||||||
html = ''
|
html = ''
|
||||||
if (ruby.length) {
|
if (ruby.length) {
|
||||||
for (i = 0; i < ruby.length; i++) {
|
for (i = 0; i < ruby.length; i++) {
|
||||||
html += ruby[i]['orig'] + '<rt>' + ruby[i]['hira'] + '</rt>';
|
html += ruby[i]['orig'] + '<rt>' + ruby[i]['hira'] + '</rt>';
|
||||||
}
|
}
|
||||||
html = '<ruby>' + html + '</ruby>'
|
html = '<ruby>' + html + '</ruby>'
|
||||||
|
document.getElementById('rubyword').innerHTML = html
|
||||||
|
document.getElementById('word').classList.add("hide-style");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
html = word
|
document.getElementById('rubyword').classList.add("hide-style");
|
||||||
}
|
}
|
||||||
document.getElementById('rubyword').innerHTML = html
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user