Optimize lambdas
This commit is contained in:
parent
aeb195e595
commit
7070d460fc
|
@ -94,23 +94,14 @@
|
||||||
content += "<p><i>The following articles will be cited:</i></p>\n";
|
content += "<p><i>The following articles will be cited:</i></p>\n";
|
||||||
for (var i = 0; i < citationList.length; i++) {
|
for (var i = 0; i < citationList.length; i++) {
|
||||||
citation = citationList[i][0].toString() + ". " + citationList[i][1];
|
citation = citationList[i][0].toString() + ". " + citationList[i][1];
|
||||||
if (writtenArticles.some(
|
if (writtenArticles.some(e => (e.title === citationList[i][1]) && (e.author === player))) {
|
||||||
function (e) {
|
content += "<p><span style=\"color:#ff0000\">" + citation + " [Written by you!]</span></p>";
|
||||||
return (e.title === citationList[i][1]) && (e.author === player);
|
} else if (writtenArticles.some(e => (e.title === citationList[i][1]))) {
|
||||||
})) {
|
content += "<p>" + citation + " [Written]";
|
||||||
content += "<p><span style=\"color:#ff0000\">" + citation + " [Written by you!]</span></p>";
|
} else if (phantomArticles.some(e => (e.title === citationList[i][1]))) {
|
||||||
} else if (writtenArticles.some(
|
content += "<p>" + citation + " [Phantom]";
|
||||||
function (e) {
|
|
||||||
return (e.title === citationList[i][1]);
|
|
||||||
})) {
|
|
||||||
content += "<p>" + citation + " [Written]";
|
|
||||||
} else if (phantomArticles.some(
|
|
||||||
function (e) {
|
|
||||||
return (e.title === citationList[i][1]);
|
|
||||||
})) {
|
|
||||||
content += "<p>" + citation + " [Phantom]";
|
|
||||||
} else {
|
} else {
|
||||||
content += "<p>" + citation + " [New]";
|
content += "<p>" + citation + " [New]";
|
||||||
}
|
}
|
||||||
content += "</p>\n";
|
content += "</p>\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue