Changes for page Material Collection

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

From version 55.16
edited by Benjamin Fischer
on 2024/10/28 13:35
Change comment: There is no comment for this version
To version 55.11
edited by Benjamin Fischer
on 2024/10/25 15:10
Change comment: There is no comment for this version

Summary

Details

XWiki.JavaScriptExtension[0]
Code
... ... @@ -1,6 +1,6 @@
1 1  const tabName = "materials";
2 2  const tagCols = [
3 - ["Type", "lecture", "exercise", "hands-on", "solution", "tutorial", "talk", "course", "video"],
3 + ["Type", "lecture", "exercise", "hands-on", "solution", "tutorial", "talk", "course"],
4 4   ["Tags", true],
5 5  ]
6 6  
... ... @@ -62,7 +62,6 @@
62 62   if (u.hostname.includes("github")) icon = "github";
63 63   if (u.hostname.includes("gitlab")) icon = "gitlab";
64 64   if (u.hostname.includes("google")) icon = "google";
65 - if (u.hostname.includes("youtube")) incon = "youtube-play";
66 66   if (u.pathname.endsWith(".pdf")) icon = "file-pdf-o";
67 67   if (icon) {
68 68   const s = a.ownerDocument.createElement("span");
... ... @@ -73,6 +73,8 @@
73 73   }
74 74   a.setAttribute("class", "wikiexternallink");
75 75   a.setAttribute("href", u.href);
75 +
76 + a.parentNode
76 76  
77 77   row.doc_location = ol.outerHTML;
78 78  
... ... @@ -83,7 +83,7 @@
83 83   want[0] === true
84 84   ? Array.from(tags)
85 85   : want.filter(tag => tags.delete(tag))
86 - ).sort().map(tag => `<span class="ltTag" style="cursor:pointer;white-space:nowrap;">${tag}</span>`).join(", ")
87 + ).sort().map(tag => `<span class="ltTag" style="cursor:pointer;">${tag}</span>`).join(", ")
87 87   );
88 88   }
89 89  });