close #3. needs to look better, but good enuff for now
This commit is contained in:
parent
03d6ad19f3
commit
285c707290
37
main.js
37
main.js
@ -316,6 +316,43 @@ function doSearch(state = true) {
|
||||
temp += "</p></details>";
|
||||
meaning.innerHTML += temp;
|
||||
}
|
||||
//antonyms, synonyms
|
||||
if (json[results[i]][o]["antonyms"] != undefined) {
|
||||
let temp = ""
|
||||
temp += "<details class='result-nyms'><summary>Antonyms</summary><p>";
|
||||
for (let e in json[results[i]][o]["antonyms"]) {
|
||||
let r = json[results[i]][o]["antonyms"][e];
|
||||
temp += "<span class='heonian'>"+generateRuby(r);
|
||||
if (json[r] != undefined) {
|
||||
temp += " - ";
|
||||
for (let i in json[r]) {
|
||||
if (i != 0) temp += ", ";
|
||||
temp += json[r][i]["translation"];
|
||||
}
|
||||
}
|
||||
temp += "</span><br>";
|
||||
}
|
||||
temp += "</p></details>";
|
||||
meaning.innerHTML += temp;
|
||||
}
|
||||
if (json[results[i]][o]["synonyms"] != undefined) {
|
||||
let temp = ""
|
||||
temp += "<details class='result-nyms'><summary>Synonyms</summary><p>";
|
||||
for (let e in json[results[i]][o]["synonyms"]) {
|
||||
let r = json[results[i]][o]["synonyms"][e];
|
||||
temp += "<span class='heonian'>"+generateRuby(r);
|
||||
if (json[r] != undefined) {
|
||||
temp += " - ";
|
||||
for (let i in json[r]) {
|
||||
if (i != 0) temp += ", ";
|
||||
temp += json[r][i]["translation"];
|
||||
}
|
||||
}
|
||||
temp += "</span><br>";
|
||||
}
|
||||
temp += "</p></details>";
|
||||
meaning.innerHTML += temp;
|
||||
}
|
||||
//notes
|
||||
if (json[results[i]][o]["notes"] != undefined) {
|
||||
meaning.innerHTML += "<p class='result-notes'>"+json[results[i]][o]["notes"]+"</p>";
|
||||
|
Loading…
Reference in New Issue
Block a user