Update index.html
Browse files- index.html +7 -4
index.html
CHANGED
@@ -218,18 +218,21 @@
|
|
218 |
const submissions = row.row.submitted || 0;
|
219 |
if (submissions > 0) {
|
220 |
acc.languages.add(row.row.language_dataset_name);
|
|
|
|
|
|
|
|
|
221 |
}
|
222 |
acc.total += submissions;
|
223 |
return acc;
|
224 |
},
|
225 |
-
{ total: 0, languages: new Set() }
|
226 |
);
|
227 |
|
228 |
document.getElementById("total-annotations").innerHTML = `
|
229 |
<p>Total annotations submitted: <strong>${stats.total.toLocaleString()}</strong></p>
|
230 |
-
<p>Languages with annotations: <strong>${
|
231 |
-
|
232 |
-
}</strong></p>
|
233 |
`;
|
234 |
} catch (error) {
|
235 |
console.error("Error fetching total annotations:", error);
|
|
|
218 |
const submissions = row.row.submitted || 0;
|
219 |
if (submissions > 0) {
|
220 |
acc.languages.add(row.row.language_dataset_name);
|
221 |
+
// Add username to the Set if it exists
|
222 |
+
if (row.row.username) {
|
223 |
+
acc.users.add(row.row.username);
|
224 |
+
}
|
225 |
}
|
226 |
acc.total += submissions;
|
227 |
return acc;
|
228 |
},
|
229 |
+
{ total: 0, languages: new Set(), users: new Set() }
|
230 |
);
|
231 |
|
232 |
document.getElementById("total-annotations").innerHTML = `
|
233 |
<p>Total annotations submitted: <strong>${stats.total.toLocaleString()}</strong></p>
|
234 |
+
<p>Languages with annotations: <strong>${stats.languages.size}</strong></p>
|
235 |
+
<p>Total contributors: <strong>${stats.users.size}</strong></p>
|
|
|
236 |
`;
|
237 |
} catch (error) {
|
238 |
console.error("Error fetching total annotations:", error);
|