Changeset 1430
- Timestamp:
- 11/14/07 04:25:41 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
websites/coderepos.org/trac/share/js/TracAuthorIcon.js
r1422 r1430 2 2 // vim:ft=javascript:expandtab 3 3 var TracAuthorIcon = { 4 // ここにアイコンの対応を書く(はてなIDまたはURL)5 4 authorIcons : { 6 //'tomoyo' : 'http://www.hatena.ne.jp/users/ma/mayuki/profile_s.gif'7 //'tomoyo' : 'id:mayuki'5 //'tomoyo' : 'http://www.hatena.ne.jp/users/ma/mayuki/profile_s.gif' 6 //'tomoyo' : 'id:mayuki' 8 7 '*default*' : 'http://coderepos.org/share/htdocs/default-author-icon.png' 9 8 , 'mayuki' : 'id:mayuki' … … 21 20 , 'xcezx' : 'id:xcezx' 22 21 , 'nyarla' : 'id:nyarla-net' 23 //, 'hidek' : ''24 22 , 'tokuhirom' : 'id:tokuhirom' 25 23 , 'daisuke' : 'id:lestrrat' … … 76 74 if (authors.length) 77 75 authors[0].parentNode.parentNode.className = "committer-list"; 78 // if ( /MSIE 6\.0/.test(navigator.userAgent)) {76 // if (navigator.userAgent.indexOf("Mozilla/4.0 (compatible; MSIE 6.0") >= 0) { 79 77 // for (var i = 0, n = authors.length; i < n; i++) { 80 78 // authors[i].parentNode.className = "committer-list"; … … 133 131 } else { 134 132 authorE = authorEOrArray; 135 author = TracAuthorIcon.getText(authorE).replace(/ (^\s+|\??\s*$)/g, '');133 author = TracAuthorIcon.getText(authorE).replace(/^\s+|\??\s*$/g, ''); 136 134 } 137 135 … … 174 172 var arrRegExpClassNames = new Array(); 175 173 if(typeof oClassNames == "object"){ 176 for(var i =0; i<oClassNames.length; i++){177 arrRegExpClassNames.push(new RegExp("( ^|\s)" + oClassNames[i].replace(/-/g, "\-") + "(\s|$)"));174 for(var i = 0, l = oClassNames.length; i < l; i++){ 175 arrRegExpClassNames.push(new RegExp("(?:^|\s)" + oClassNames[i] + "(?:\s|$)")); 178 176 } 179 177 } 180 178 else{ 181 arrRegExpClassNames.push(new RegExp("( ^|\s)" + oClassNames.replace(/-/g, "\-") + "(\s|$)"));179 arrRegExpClassNames.push(new RegExp("(?:^|\s)" + oClassNames + "(?:\s|$)")); 182 180 } 183 181 var oElement; 184 182 var bMatchesAll; 185 for(var j=0; j<arrElements.length; j++){186 oElement = arrElements[ j];183 for(var i = 0, l = arrElements.length; i < l; i++){ 184 oElement = arrElements[i]; 187 185 bMatchesAll = true; 188 for(var k=0; k<arrRegExpClassNames.length; k++){189 if(!arrRegExpClassNames[ k].test(oElement.className)){186 for(var j = 0, m = arrRegExpClassNames.length; j < m; j++){ 187 if(!arrRegExpClassNames[j].test(oElement.className)){ 190 188 bMatchesAll = false; 191 189 break;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)