| 94 | | // This is for committer list of CodeRepos. |
| 95 | | authors = TracAuthorIcon.$X("id('Committers')/following-sibling::ul[1]//a[contains(@href, '/share/wiki/Committers/')]", Array); |
| 96 | | if (authors.length) { |
| 97 | | authors[0].parentNode.parentNode.className = "committer-list"; |
| | 94 | if (/\/share\/wiki\/Committers\/([^\/]+)/.test(location.pathname)) { |
| | 95 | var author = RegExp.$1; |
| | 96 | var content = $X("id('content')")[0]; |
| | 97 | var iconurl = TracAuthorIcon.getIconByAuthor(author); |
| | 98 | if (!iconurl) break; |
| | 99 | var img = document.createElement('img'); |
| | 100 | img.src = iconurl; |
| | 101 | img.alt = ''; |
| | 102 | img.width = '16'; |
| | 103 | img.height = '16'; |
| | 104 | img.className = "committer-icon"; |
| | 105 | var h1 = $X("id('searchable')/h1[1]")[0]; |
| | 106 | if (h1) { |
| | 107 | h1.appendChild(img); |
| | 108 | } else { |
| | 109 | content.insertBefore(img, content.firstChild); |
| | 110 | } |
| | 111 | } else |
| | 112 | if (location.pathname == "/share/wiki") { |
| | 113 | // This is for committer list of CodeRepos. |
| | 114 | authors = TracAuthorIcon.$X("id('Committers')/following-sibling::ul[1]//a[contains(@href, '/share/wiki/Committers/')]", Array); |
| | 115 | if (authors.length) { |
| | 116 | authors[0].parentNode.parentNode.className = "committer-list"; |
| | 117 | } |