Changes for page Material Collection

Last modified by Judith Steinfeld on 2025/06/03 11:13

From version 55.1
edited by admin
on 2024/10/23 12:01
Change comment: There is no comment for this version
To version 55.6
edited by admin
on 2024/10/23 14:50
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
XWiki.JavaScriptExtension[0]
Code
... ... @@ -22,7 +22,7 @@
22 22  
23 23   // column headers
24 24   mats.querySelectorAll(".xwiki-livetable-display-header .tagsCol").forEach(
25 - (v, i) => v.firstElementChild.textContent = tagCols[i][0]
25 + (v, i) => v.textContent = tagCols[i][0]
26 26   );
27 27  
28 28   // handle clicks for tags
... ... @@ -54,6 +54,9 @@
54 54   const a = li[li.length - 1].children[0];
55 55   const u = new URL(row.link_value);
56 56   let icon;
57 + if (u.hostname.includes("github")) icon = "github";
58 + if (u.hostname.includes("gitlab")) icon = "gitlab";
59 + if (u.hostname.includes("google")) icon = "google";
57 57   if (u.pathname.endsWith(".pdf")) icon = "file-pdf-o";
58 58   if (icon) {
59 59   const s = a.ownerDocument.createElement("span");