« get me outta code hell

content: listArtTagNetwork: descendants (leaves only) stat - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/js/client
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-03-19 20:51:37 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-02-25 20:03:28 -0400
commit73da644065a191d6d77237395a8684cc2f665e0c (patch)
treef260bb4c90149fc036b55116985a13fd1b70ae6a /src/static/js/client
parent9d4080b003c8786e6b1faecd90c304d39e413af9 (diff)
content: listArtTagNetwork: descendants (leaves only) stat
Diffstat (limited to 'src/static/js/client')
-rw-r--r--src/static/js/client/art-tag-network.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/static/js/client/art-tag-network.js b/src/static/js/client/art-tag-network.js
index fc5f6526..44e10c11 100644
--- a/src/static/js/client/art-tag-network.js
+++ b/src/static/js/client/art-tag-network.js
@@ -11,6 +11,7 @@ export const info = {
   totalUsesStatLink: null,
   directUsesStatLink: null,
   descendantsStatLink: null,
+  leavesStatLink: null,
 
   tagsWithoutStats: null,
   tagsWithStats: null,
@@ -18,6 +19,7 @@ export const info = {
   totalUsesStats: null,
   directUsesStats: null,
   descendantsStats: null,
+  leavesStats: null,
 };
 
 export function getPageReferences() {
@@ -40,6 +42,9 @@ export function getPageReferences() {
   info.descendantsStatLink =
     document.getElementById('network-stat-descendants');
 
+  info.leavesStatLink =
+    document.getElementById('network-stat-leaves');
+
   info.tagsWithoutStats =
     document.querySelectorAll('.network-tag:not(.with-stat)');
 
@@ -54,6 +59,9 @@ export function getPageReferences() {
 
   info.descendantsStats =
     Array.from(document.getElementsByClassName('network-tag-descendants-stat'));
+
+  info.leavesStats =
+    Array.from(document.getElementsByClassName('network-tag-leaves-stat'));
 }
 
 export function addPageListeners() {
@@ -64,6 +72,7 @@ export function addPageListeners() {
     info.totalUsesStatLink,
     info.directUsesStatLink,
     info.descendantsStatLink,
+    info.leavesStatLink,
   ];
 
   const statsOrder = [
@@ -71,6 +80,7 @@ export function addPageListeners() {
     info.totalUsesStats,
     info.directUsesStats,
     info.descendantsStats,
+    info.leavesStats,
   ];
 
   const stitched =
@@ -110,6 +120,7 @@ function showArtTagNetworkStats(stats) {
     ...info.totalUsesStats,
     ...info.directUsesStats,
     ...info.descendantsStats,
+    ...info.leavesStats,
   ];
 
   const otherStats =