support pitch number inside pitch html
This commit is contained in:
parent
2b060a5c93
commit
80a1af77e4
|
@ -67,12 +67,16 @@
|
|||
const has_no_data = (tag) => tag.innerText.toLowerCase().includes("no pitch accent");
|
||||
const pitch_num = document.getElementById("pitchnum");
|
||||
const pitch_pattern = document.getElementById("pitchpattern");
|
||||
const pitch_num_inside_html = document.querySelector(".pitch_number");
|
||||
if (pitch_num && has_no_data(pitch_num)) {
|
||||
pitch_num.remove();
|
||||
}
|
||||
if (pitch_pattern && has_no_data(pitch_pattern)) {
|
||||
pitch_pattern.innerHTML = `{{text:kana:VocabFurigana}}`;
|
||||
}
|
||||
if (pitch_num && pitch_num_inside_html) {
|
||||
pitch_num.remove();
|
||||
}
|
||||
}
|
||||
|
||||
markPitch();
|
||||
|
|
|
@ -145,4 +145,4 @@ Sun Mar 5 12:08:06 AM UTC 2023
|
|||
splitTagDiv();
|
||||
setImageOnFront();
|
||||
reformatMultiFurigana();
|
||||
</script>
|
||||
</script>
|
|
@ -210,6 +210,7 @@ div.ensentence>a.hint:hover {
|
|||
|
||||
/* Tags */
|
||||
|
||||
.pitch_number,
|
||||
.tags {
|
||||
font-family:
|
||||
"Noto Sans",
|
||||
|
@ -346,6 +347,7 @@ footer>a:not(:last-child)::after {
|
|||
display: none;
|
||||
}
|
||||
|
||||
.vocab .pitch_number,
|
||||
.vocab .tags {
|
||||
align-self: flex-start;
|
||||
vertical-align: top;
|
||||
|
@ -554,4 +556,4 @@ div[contenteditable="true"] {
|
|||
border: 1px solid gray;
|
||||
padding: 3px;
|
||||
box-shadow: 10px 5px 5px gray;
|
||||
}
|
||||
}
|
|
@ -241,6 +241,7 @@ footer>a:last-child:after {
|
|||
width: 0;
|
||||
}
|
||||
|
||||
.pitch_number,
|
||||
.tags {
|
||||
font-family:
|
||||
"Noto Sans",
|
||||
|
@ -264,6 +265,11 @@ footer>a:last-child:after {
|
|||
line-height: 14px;
|
||||
}
|
||||
|
||||
.pitch_number {
|
||||
align-self: flex-start;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/*
|
||||
AnkiDroid peplay button
|
||||
.replaybutton is an <a> tag with a <span> that has an <svg> inside
|
||||
|
|
Loading…
Reference in a new issue