Changes for page Material Collection

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

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

Summary

Details

XWiki.JavaScriptExtension[0]
Code
... ... @@ -62,18 +62,17 @@
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";
65 65   if (u.pathname.endsWith(".pdf")) icon = "file-pdf-o";
66 66   if (icon) {
67 67   const s = a.ownerDocument.createElement("span");
68 68   s.textContent = " ";
69 69   s.setAttribute("class", `fa fa-${icon}`);
70 - s.setAttribute("style", "padding-right: .3em;word-wrap: nowrap;");
71 + s.setAttribute("style", "padding-right: .3em;");
71 71   a.insertBefore(s, a.firstChild);
72 72   }
73 73   a.setAttribute("class", "wikiexternallink");
74 74   a.setAttribute("href", u.href);
75 -
76 - a.parentNode
77 77  
78 78   row.doc_location = ol.outerHTML;
79 79  
... ... @@ -84,7 +84,7 @@
84 84   want[0] === true
85 85   ? Array.from(tags)
86 86   : want.filter(tag => tags.delete(tag))
87 - ).sort().map(tag => `<span class="ltTag" style="cursor:pointer;">${tag}</span>`).join(", ")
86 + ).sort().map(tag => `<span class="ltTag" style="cursor:pointer;white-space:nowrap;">${tag}</span>`).join(", ")
88 88   );
89 89   }
90 90  });