Restored furigana hover feature.

This commit is contained in:
doncr 2020-10-30 17:07:28 +00:00
parent 21a4323191
commit 280c1296c6
2 changed files with 10 additions and 1 deletions

View File

@ -266,4 +266,13 @@ dl.questionOptions dd {
#quizSection span.first,
#scoreSection span.first {
text-transform: capitalize;
}
ruby.furiganaHover rt, ruby.furiganaHover rp {
opacity: 0;
transition: opacity 0.2s;
}
ruby.furiganaHover:hover rt, ruby.furiganaHover:hover rp {
opacity: 100;
}

View File

@ -130,7 +130,7 @@ function wordWithFurigana(words) {
} else if (options["furigana_always"]) {
bits[0] = bits[0] + "<ruby>" + bits[1] + "<rp>(</rp><rt>" + bits[2] + "</rt><rp>)</rp></ruby>" + bits[3];
} else {
bits[0] = bits[0] + bits[1] + bits[3];
bits[0] = bits[0] + "<ruby class='furiganaHover'>" + bits[1] + "<rp>(</rp><rt>" + bits[2] + "</rt><rp>)</rp></ruby>" + bits[3];
}
bits.splice(1, 3);
}