Content deleted Content added
Opencooper (talk | contribs) test Tag: Reverted |
Opencooper (talk | contribs) comment |
||
(3 intermediate revisions by the same user not shown) | |||
Line 51:
https://en.wikipedia.org/wiki/Ninjō - No interlanguage, but wiktionary
https://en.wikipedia.org/wiki/Seiza - Interlanguage failed, but wiktionary
https://en.wikipedia.org/wiki/Epsomite - No interlanguage, but wiktionary "see" Table
https://en.wikipedia.org/wiki/Bakayaro!_I%27m_Plenty_Mad - only part of parenthesis extracted
Line 170 ⟶ 171:
// Add kanji to regex to make sure we're not getting the reading of some
// other term
kanjiRegexes.leadUnspaced = new RegExp(
kanjiRegexes.lead = new RegExp(
}
Line 414 ⟶ 415:
// Wiktionary adds readings as furigana
var headword = parsed.find(".headword:lang(ja)").first();
var seeTable = parsed.find(".Jpan ruby").first();
var kanji = "";
var kana = "";
if (headword.length) {
for (let i = 0; i < childNodes.length; i++) {
var ruby = $(childNodes[i]); // convert back to JQuery for convenience
ruby.children("rp").remove();▼
kanji += ruby.text();
} else if (childNodes[i].nodeType == 3) { // "#text" kanji += childNodes[i].nodeValue;
kana += childNodes[i].nodeValue;
}
}
} else if (seeTable.length) {
kanji = seeTable.children("rb").text();
} else {
return;
}
▲ if (kanji != wikidataKanji) { return; }
if (kana) {
|