Changeset 17926

Show
Ignore:
Timestamp:
08/20/08 15:55:48 (3 months ago)
Author:
g000001
Message:

added g000001 icon.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • websites/coderepos.org/trac/share/js/TracUtils.js

    r17848 r17926  
    88 
    99$(function () { 
    10         TracUtils.installAll(); 
     10        TracUtils.installAll(); 
    1111}); 
    1212 
    1313var TracUtils = { 
    14         SVN_REPOS_BASE : 'http://svn.coderepos.org/share', 
    15         TRAC_BASE      : 'http://coderepos.org/share', 
    16         AUTHOR_ICONS   : { 
    17                 //'tomoyo'       : 'http://www.hatena.ne.jp/users/ma/mayuki/profile_s.gif' 
    18                 //'tomoyo'       : 'id:mayuki' 
    19                   '*default*'    : 'http://coderepos.org/share/htdocs/default-author-icon.png' 
    20                 , 'mayuki'       : 'id:mayuki' 
    21                 , 'yappo'        : 'id:yappo' 
    22                 , 'typester'     : 'http://en.gravatar.com/avatar/fbc6511bcc0649366086c0445fb456d3?s=16'//'id:typester' 
    23                 , 'kentaro'      : 'id:antipop' 
    24                 , 'mizzy'        : 'id:gosukenator' 
    25                 , 'charsbar'     : 'id:charsbar' 
    26                 , 'secondlife'   : 'id:secondlife' 
    27                 , 'kazeburo'     : 'id:kazeburo' 
    28                 , 'otsune'       : 'id:otsune' 
    29                 , 'hirose31'     : 'id:hirose31' 
    30                 , 'nipotan'      : 'id:nipotan' 
    31                 , 'itkz'         : 'id:ITKz' 
    32                 , 'xcezx'        : 'id:xcezx' 
    33                 , 'nyarla'       : 'id:nyarla-net' 
    34                 , 'tokuhirom'    : 'id:tokuhirom' 
    35                 , 'daisuke'      : 'id:lestrrat' 
    36                 , 'kana'         : 'id:ka-nacht' 
    37                 , 'cho45'        : 'id:cho45' 
    38                 , 'kan'          : 'id:kan' 
    39                 , 'zigorou'      : 'id:ZIGOROu' 
    40                 , 'masaki'       : 'id:ikasam_a' 
    41                 , 'holidays-l'   : 'id:holidays-l' 
    42                 , 'yoko'         : 'id:yksk' 
    43                 , 'mattn'        : 'id:mattn' 
    44                 , 'lopnor'       : 'id:lopnor' 
    45                 , 'gyuque'       : 'id:gyuque' 
    46                 , 'yugui'        : 'id:yugui' 
    47                 , 'akihito'      : 'id:t-akihito' 
    48                 , 'fujiwara'     : 'id:sfujiwara' 
    49                 , 'yusukebe'     : 'id:kamawada' 
    50                 , 'miyagawa'     : 'id:miyagawa' 
    51                 , 'topia'        : 'id:topia' 
    52                 , 'woremacx'     : 'id:woremacx' 
    53                 , 'amachang'     : 'id:amachang' 
    54                 , 'takesako'     : 'id:TAKESAKO' 
    55                 , 'eto'          : 'id:eto' 
    56                 , 'dankogai'     : 'id:dankogai' 
    57                 , 'jknaoya'      : 'id:jknaoya' 
    58                 , 'yasu'         : 'id:hirata_yasuyuki' 
    59                 , 'holygrail'    : 'id:HolyGrail' 
    60                 , 'elim'         : 'id:elim' 
    61                 , 'cheebow'      : 'id:cheebow' 
    62                 , 'ariela'       : 'http://en.gravatar.com/avatar/dd5dfb5d738d5b5fb1c9a8b234945ea6?s=16'//'id:transrain' 
    63                 , 'tomyhero'     : 'id:tomyhero' 
    64                 , 'hetappi'      : 'id:hetappi' 
    65                 , 'coji'         : 'id:coji' 
    66                 , 'takemaru'     : 'id:teahut' 
    67                 , 'akasata'      : 'id:akasata' 
    68                 , 'okuryu'       : 'id:okuryu' 
    69                 , 'tasuku'       : 'id:tasukuchan' 
    70                 , 'snj14'        : 'id:snj14' 
    71                 , 'shachi'       : 'id:shachi_kk' 
    72                 , 'omoon'        : 'id:omoon' 
    73                 , 'aerith'       : 'id:aerith' 
    74                 , 'clouder'      : 'id:clouder' 
    75                 , 'takkyun'      : 'id:simpleboxes' 
    76                 , 'naoya_t'      : 'http://ntzone.info/misc/keroro.gif' 
    77                 , 'takefumi'     : 'id:takefumi' 
    78                 , 'walf443'      : 'id:walf443' 
    79                 , 'psychs'       : 'id:Psychs' 
    80                 , 'ewigkeit'     : 'id:Ewigkeit' 
    81                 , 'yoshiori'     : 'id:Yoshiori' 
    82                 , 'dev0000'      : 'http://www.developer0000.jp/16.jpg' 
    83                 , 'machu'        : 'id:kmachu' 
    84                 , 'norio_s'      : 'id:norio_s' 
    85                 , 'hsbt'         : 'id:h-sbt' 
    86                 , 'nori090'      : 'id:nori090' 
    87                 , 'lyokato'      : 'id:lyokato' 
    88                 , 'drgqst'       : 'id:drgqst' 
    89                 , 'mrkn'         : 'id:mrkn' 
    90                 , 'tfunato'      : 'id:tfunato' 
    91                 , 'tsuka'        : 'id:tsuka05' 
    92                 , 'niw'          : 'id:niw' 
    93                 , 'tomi-ru'      : 'id:tomi-ru' 
    94                 , 'yto'          : 'id:yto' 
    95                 , 'motemen'      : 'id:motemen' 
    96                 , 'shyouhei'     : 'http://mput.dip.jp/mput/images/icon.jpg' 
    97                 , 'm-takagi'     : 'http://en.gravatar.com/avatar/c3f5a6e729b57f99cb9e7b3ca60152aa?s=16' 
    98                 , 'takano32'     : 'id:takano32' 
    99                 , 'kakutani'     : 'id:kakutani' 
    100                 , 'poppen'       : 'id:poppen' 
    101                 , 'kotas'        : 'id:kotas' 
    102                 , 'nekokak'      : 'id:nekokak' 
    103                 , 'tosik'        : 'id:tosik' 
    104                 , 'fbis'         : 'id:fbis' 
    105                 , 'rsk'          : 'id:rsky' 
    106                 , 'mallowlabs'   : 'id:mallowlabs' 
    107                 , 'nakamud'      : 'http://s3.amazonaws.com/twitter_production/profile_images/35752262/SP_mu-toko_mini.jpg' 
    108                 , 'chiba'        : 'id:nihen' 
    109                 , 'funaki'       : 'id:nob_funaki' 
    110                 , 'dzfl'         : 'id:dzfl' 
    111                 , 'shimooka'     : 'id:shimooka' 
    112                 //, 'noriaki'      : 'http://s3.amazonaws.com/twitter_production/profile_images/40454133/2f94929d_mini.jpg'//FIXME: 404 
    113                 , 'suztomo'      : 'id:suztomo' 
    114                 , 'klm'          : 'id:k1m' 
    115                 , 'akio0911'     : 'id:akio0911' 
    116                 , 'cactusman'    : 'id:cactusman' 
    117                 , 'vkgtaro'      : 'id:vkgtaro' 
    118                 , 'todesking'    : 'http://data.tumblr.com/avatar_1fe558be2f23_16.gif' 
    119                 , 'sho'          : 'id:sho' 
    120                 , 'a2c'          : 'id:a2c' 
    121                 , 'hidek'        : 'http://en.gravatar.com/avatar/7d55041891ece2f35375108aa2d27255?s=16'//'id:hide-K'' 
    122                 , 'yhara'        : 'id:yhara' 
    123                 , 'PoohKid'      : 'id:PoohKid' 
    124                 , 'samurai20000' : 'id:samurai20000' 
    125                 , 'yasuyuki'     : 'id:YaSuYuKi' 
    126                 , 'mootoh'       : 'id:moira' 
    127                 , 'tokada'       : 'id:tokada' 
    128                 , 'llamerada'    : 'id:llamerada' 
    129                 , 'shn'          : 'id:shn' 
    130                 , 'nejimaki'     : 'id:firewood' 
    131                 , 'kan'          : 'id:mikihoshi' 
    132                 , 'hideden'      : 'id:hideden' 
    133                 , 'niku'         : 'http://niku.name/favicon.ico' 
    134                 , 'ohac'         : 'id:ohac' 
    135                 , 'hio'          : 'http://en.gravatar.com/avatar/a72d2120c066d47ad3d29c17b2f4db72?s=16' 
    136                 , 'os0x'         : 'id:os0x' 
    137                 , 'akiyan'       : 'id:akiyan' 
    138                 , 'inudog'       : 'http://eringi.com/favicon.ico' 
    139                 , 'suzuki'       : 'id:zatsubun' 
    140                 , 'haruka'       : 'http://drumsoft.com/favicon.ico' 
    141                 , 'syttru'       : 'id:syttru' 
    142                 , 'iskwrsk'      : 'id:iskwrsk' 
    143                 , 'komatsuna'    : 'http://data.tumblr.com/avatar_82a9ef4053ec_30.gif' 
    144                 , 'tarchan'      : 'id:tarchan' 
    145                 , 'tyoro'        : 'id:tyoro1210' 
    146                 , 'Sore_0'       : 'id:Sore_0' 
    147                 , 'teramako'     : 'id:teramako' 
    148                 , 'kamipo'       : 'id:kamipo' 
    149                 , 'ihag'         : 'id:ihag' 
    150                 , 'valda'        : 'http://data.tumblr.com/avatar_a5fb0192ec7d_16.gif' 
    151                 , 'gan2'         : 'id:gan2' 
    152                 , 'sasezaki'     : 'id:sasezaki' 
    153                 , 'kdoya'        : 'id:kdoya' 
    154                 , 'stomita'      : 'id:shinichitomita' 
    155                 , 'cesare'       : 'id:cesare' 
    156                 , 'ku'           : 'id:ku0522' 
    157                 , 'DotMG'        : 'http://dotmg.net/favicon.ico' 
    158                 , 'akihirox'     : 'id:akihirox' 
    159                 , 'ha1t'         : 'id:ha1t' 
    160                 , 'hiro_y'       : 'id:hiro_y' 
    161                 , 'hiratara'     : 'id:hiratara' 
    162                 , 'sotarok'      : 'id:sotarok' 
    163                 , 'bto'          : 'http://bz2.jp/myself.jpg' 
    164                 , 'quek'         : 'id:quek' 
    165                 , 'SKAhack'      : 'id:SKAhack' 
    166                 , 'discypus'     : 'http://discypus.jp/favicon.ico' 
    167                 , 'maru_cc'      : 'id:maru_cc' 
    168                 , 'key'          : 'http://en.gravatar.com/avatar/57eb5b1713206c5edb521dde99cc5f30?s=16' 
    169                 , 'matarillo'    : 'id:matarillo' 
    170                 , 'stellaqua'    : 'id:stellaqua' 
    171                 , 'hiraku'       : 'http://www.hinet.mydns.jp/hiraku.png' 
    172                 , 'heavenshell'  : 'id:heavenshell' 
    173                 , 'toby_net'     : 'id:toby' 
    174                 , 'bonnu'        : 'id:boxphere' 
    175                 , 'kga'          : 'id:KGA' 
    176                 , 'wakapon'      : 'id:w-a_k-a_p-o_n' 
    177                 , 'hakobe'       : 'id:hakobe932' 
    178                 , 'from_kyushu'  : 'id:from_kyushu' 
    179                 , 'anatoo'       : 'id:anatoo' 
    180                 , 'kumatch'      : 'id:hato_kumatch' 
    181                 , 'keisuken'     : 'id:keisuke_n' 
    182                 , 'yaa'          : 'id:YAA' 
    183                 , 'mariot'       : 'id:mariot1218' 
    184                 , 'kshimo69'     : 'id:kshimo69' 
    185                 , 'fujidig'      : 'id:chaperatta' 
    186                 , 'wozozo'       : 'id:wozozo' 
    187                 , 'riaf'         : 'id:riaf' 
    188                 , 'michisu'      : 'id:michisu' 
    189                 , 'javascripter' : 'id:javascripter' 
    190                 , 'nothingmuch'  : 'http://en.gravatar.com/avatar/81912bc5ca02376f99a5ee44531dee27?s=16' 
    191                 , 'dragon3'      : 'id:dragon3' 
    192                 , 'oppara'       : 'id:oppara' 
    193                 , 'MichaeL'      : 'id:MichaeL' 
    194                 , 'fd0'          : 'id:fd0' 
    195                 , 'kiske'        : 'id:Kiske' 
    196                 , 'ishihara'     : 'id:m4i' 
    197                 , 'whym'         : 'id:whym' 
    198                 , 'anekos'       : 'id:nokturnalmortum' 
    199                 , 'sakito'       : 'id:sakito' 
    200                 , 'Yuichirou'    : 'id:Yuichirou' 
    201                 , 'mux03'        : 'id:mux03' 
    202                 , 'rewish'       : 'id:Rewish' 
    203                 , 'yudoufu'      : 'id:Yudoufu' 
    204                 , 'n0ts'         : 'id:n0ts' 
    205                 , 'yuroyoro'     : 'id:yuroyoro' 
    206         } 
    207  
    208         , installAll : function () { 
    209                 TracUtils.addJumpToReposLink(); 
    210                 TracUtils.clickableCodeArea(); 
    211                 TracUtils.addBodyClass(); 
    212                 TracUtils.addCommitterRecentCommits(); 
    213                 TracUtils.addRecentChangesForProject(); 
    214                 TracUtils.addUserscriptsUtils(); 
    215                 TracUtils.AuthorIcons.showAuthorIcons(); 
    216         } 
    217  
    218         , isWikiStart : function () { 
    219                 var pn = location.pathname 
    220                 return ( 
    221                         pn == "/share/wiki/WikiStart" || 
    222                         pn == "/share/wiki/" || 
    223                         pn == "/share/wiki" || 
    224                         pn == "/share/" || 
    225                         pn == "/share" 
    226                 ); 
    227         } 
    228  
    229         , getSourcePath : function (tracPath) { 
    230                 return String(tracPath).replace(TracUtils.TRAC_BASE + "/browser", TracUtils.SVN_REPOS_BASE).replace(/\?.*$/, ''); 
    231         } 
    232  
    233         /** 
    234          * Browse Source のときに該当する svn web にすぐ翔べるリンクと 
    235          * ?rev= をはずすリンクを追加 
    236          */ 
    237         , addJumpToReposLink : function () { 
    238                 var aboutLink = $("#metanav li.last a"); 
    239                 if (location.pathname.indexOf("/share/browser") == 0) { 
    240                         var sourcePath = TracUtils.getSourcePath(location); 
    241                         aboutLink.replaceWith( 
    242                                 $("<a title='Jump to Repository'>SVN Web</a>").attr("href", sourcePath) 
    243                         ); 
    244                         $("#ctxtnav li:first").after($("<li/>").append($("<a>SVN Web</a>").attr("href", sourcePath))); 
    245                         $("#ctxtnav li:first").after($("<li/>").append($("<a>Latest Revision</a>").attr("href", location.pathname))); 
    246                 } else { 
    247                         aboutLink.replaceWith( 
    248                                 $("<a title='Jump to Repository'>SVN Web</a>").attr("href", TracUtils.SVN_REPOS_BASE) 
    249                         ); 
    250                 } 
    251         } 
    252  
    253         /** 
    254          * Wiki に書かれた JS のコードを実行可能に 
    255          * 冒頭に //Executable と書くと実行できるようになる。 
    256          */ 
    257         , clickableCodeArea : function () { 
    258                 var start = "//Executable"; 
    259                 $("//*[@id='content']//div[@class='code']/pre[contains(.//span[@class='code-comment'],'"+start+"')]").each(function () { 
    260                         var e  = $(this); 
    261                         var js = e.text(); 
    262                         var a  = $("<a href='javascript:void(156)'>Click to execute.</a>").click(function () { 
    263                                 eval(js); 
    264                         }).css({ 
    265                                 fontSize   : "80%", 
    266                                 fontWeight : "bold", 
    267                                 border     : "1px solid #ccc", 
    268                                 display    : "block", 
    269                                 width      : "10em", 
    270                                 padding    : "0.2em", 
    271                                 margin     : "0 auto 0.2em 0", 
    272                                 textAlign  : "center" 
    273                         }).insertBefore(e.parent()); 
    274                 }); 
    275         } 
    276  
    277         /** 
    278          * CSS 補佐用 (IE6 で CSS セレクタの対応が貧弱なため) 
    279          */ 
    280         , addBodyClass : function () { 
    281                 if (location.pathname.indexOf("/share/wiki/Committers") == 0) { 
    282                         document.body.className = "committer"; 
    283                 } 
    284                 if (TracUtils.isWikiStart()) { 
    285                         $("//*[@id='Committers']/following-sibling::ul[1]").addClass("committer-list"); 
    286                         $("//*[@id='Projects']/following-sibling::ul[1]").addClass("project-list"); 
    287                 } 
    288         } 
    289  
    290         /** 
    291          * コミッタページにその人の最近のコミットリストを表示する。 
    292          * Trac の検索機能を使っているので、コミットログに名前をかきまくると 
    293          * 検索結果の1ページ目 == 10個しかみていないので 
    294          * その人の最近のコミットがなかったことになるいじめができる。 
    295          */ 
    296         , addCommitterRecentCommits : function () { 
    297                 if (!location.search && !/^\/share\/wiki\/Committers\/([^\/]{3,})/.test(location.pathname)) return; 
    298                 var author = RegExp.$1; 
    299                 $.get(TracUtils.TRAC_BASE+"/search?q="+author+"&noquickjump=1&changeset=on", {}, function (data) { 
    300                         $("<div class='recent-commits'><h2>Recent Commits</h2></div>").append( 
    301                                 $(data).xfind(".//dl") 
    302                                         .xfind("dd[span[@class='author'] != 'By "+author+"']") 
    303                                                 .xfind("preceding-sibling::dt[1] | preceding-sibling::dd[1]").remove().end() 
    304                                         .remove().end() 
    305                         ).appendTo($("#searchable, #content").get(0)); 
    306                 }); 
    307         } 
    308  
    309         /** 
    310          * プロジェクトページへ最近のコミットリストを表示する。 
    311          * {{{ 
    312          * svn co http://svn.coderepos.org/share/... 
    313          * }}} 
    314          * のように co と checkout, export の書いてあるページが対象。 
    315          */ 
    316         , addRecentChangesForProject : function () { 
    317                 // IE だとなぜかどうしようもなく遅いので処理しない 
    318                 if ($.browser.msie || !TracUtils.isWikiStart() && location.pathname.indexOf("/share/wiki/") != 0) return; 
    319                 var target_re = RegExp("svn +(?:c(?:o|heckout)|export) +"+TracUtils.SVN_REPOS_BASE+"(\\S+)"); 
    320                 $("#searchable pre").each(function () { 
    321                         var m = $(this).text().match(target_re); 
    322                         if (!m) return; 
    323                         var path = m[1].replace(/\/trunk\/?$/, ""); 
    324                         var url  = TracUtils.TRAC_BASE + "/log" + path; 
    325                         $.get(url, {}, function (data) { 
    326                                 // 高速化と、jQuery がだす getElementsByTagName がないという 
    327                                 // エラーを回避するため正規表現 
    328                                 data = data.match(/<table id="chglist"[\S\s]+<\/table>/)[0]; 
    329                                 $("<div><h2><a href='"+url+"'>Project Recent Changes</a></h2></div>") 
    330                                         .append( 
    331                                                 $(data) 
    332                                                         .find("tr:gt(10)").remove().end() 
    333                                                         .find("th.diff, td.diff, th.change, td.change, th.rev, td.rev").remove().end() 
    334                                         ) 
    335                                 .appendTo("#searchable"); 
    336                         }); 
    337                         return false; 
    338                 }); 
    339         } 
    340  
    341         /** 
    342          * Userscripts のユーティリティ 
    343          */ 
    344         , addUserscriptsUtils : function () { 
    345                 if (!$.browser.mozilla && !$.browser.safari) return; 
    346                 // 尻? 
    347                 var isUserJS = function (path) { 
    348                         return /\.user\.js$/.test(path); 
    349                 }; 
    350                 // user.js のページでインストール画面がでてうざいのをなんとかする。 
    351                 // あんまり広範囲にやりたくないので決め打ち 
    352                 if (location.pathname.indexOf("/share/browser/lang/javascript/userscripts") == 0) { 
    353                         $("a").each(function () { 
    354                                 if (isUserJS(this.href)) this.href += "?"; 
    355                         }); 
    356                 } 
    357  
    358                 // user.js のページにインストール URL を追加する. 
    359                 if (isUserJS(location.pathname)) { 
    360                         var uri = TracUtils.getSourcePath(location); 
    361                         $("<a/>").attr({ 
    362                                 href  : uri, 
    363                                 title : uri.split("/").slice(-1) + " をインストールする" 
    364                         }) 
    365                         .text("インストール - " + uri) 
    366                         .insertAfter($("h1:first")); 
    367                 } 
    368         } 
    369  
    370         /** 
    371          * Trac のあらゆるところに設定されたアイコンを表示する。 
    372          * TracAuthorIcon.js を jQuery/XPath 依存にして簡略化したもの 
    373          */ 
    374         , AuthorIcons : { 
    375                 showAuthorIcons : function () { 
    376                         var authors = []; 
    377                         switch ($("#content").attr("class")) { 
    378                                 case 'browser': 
    379                                         $('//*[@id="info"]//th').each(function () { 
    380                                                 authors.push([this, $(this).text().match(/checked in by ([^,]+)/)[1]]); 
    381                                         }); 
    382                                         $('//*[@id="dirlist"]//span[@class="author"]').each(function () { 
    383                                                 authors.push([this, $(this).text().match(/^([^:]+):/)[1]]); 
    384                                         }); 
    385                                         break; 
    386                                 case 'timeline': 
    387                                         $('//*[@id="content"]//dt//span[@class="author"]').each(function () { 
    388                                                 authors.push([this, $(this).text()]); 
    389                                         }); 
    390                                         break; 
    391                                 case 'log': 
    392                                 case 'changeset': 
    393                                         authors = $('(//*[@id="overview"] | //*[@id="chglist"])//*[@class="author"]'); 
    394                                         break; 
    395                                 case 'wiki': 
    396                                         if (/^\/share\/wiki\/Committers\/([^\/]+)/.test(location.pathname)) { 
    397                                                 var author  = RegExp.$1; 
    398                                                 var iconurl = TracUtils.AuthorIcons.getIconByAuthor(author); 
    399                                                 if (!iconurl) break; 
    400                                                 var img = $("<img width='16' height='16' alt='' class='committer-icon'/>").attr("src", iconurl); 
    401                                                 var h1  = $("//*[@id='searchable']/h1[1]"); 
    402                                                 if (h1.length) { 
    403                                                         h1.append(img); 
    404                                                 } else { 
    405                                                         $("#content").prepend(img); 
    406                                                 } 
    407                                         } 
    408                                         else if (TracUtils.isWikiStart()) { 
    409                                                 // This is for committers list of CodeRepos. 
    410                                                 // var authors  
    411                                                 $.each($("//*[@id='Committers']/following-sibling::ul[1]//a[contains(@href, '/share/wiki/Committers/')]"), function() { 
    412                                                         authors.push([this, $(this).text().match(/Committer:([^,]+)/)[1]]); 
    413                                                 }) 
    414                                         } 
    415                                         break; 
    416                                 default: break; 
    417                         } 
    418  
    419                         for (var i = authors.length; i --> 0; TracUtils.AuthorIcons.insertIcon(authors[i])); 
    420  
    421                         $("#metanav ul li.first").each(function () { 
    422                                 var uname = $(this).text().match(/logged in as ([^,]+)/); 
    423                                 if (!uname) return; 
    424                                 var a = $("<a/>").attr("href", TracUtils.AuthorIcons.getAuthorPage(uname[1])).append(uname[1]); 
    425                                 a.appendTo( 
    426                                         $(this).empty().append("logged in as ") 
    427                                 ); 
    428                                 TracUtils.AuthorIcons.insertIcon(a); 
    429                         }); 
    430                 } 
    431  
    432                 , getIconByAuthor : function (author) { 
    433                         var iconUrl = TracUtils.AUTHOR_ICONS[author] || TracUtils.AUTHOR_ICONS["*default*"]; 
    434  
    435                         // Hatena ID 
    436                         iconUrl = iconUrl.replace(/^id:(([a-zA-Z][\w-])[\w-]{0,29}[a-zA-Z\d])/, 'http://www.hatena.ne.jp/users/$2/$1/profile_s.gif'); 
    437  
    438                         return iconUrl; 
    439                 } 
    440  
    441                 , insertIcon : function (authorEOrArray) { 
    442                         var authorE, author; 
    443                         if (authorEOrArray instanceof Array) { 
    444                                 authorE = $(authorEOrArray[0]); 
    445                                 author  =   authorEOrArray[1]; 
    446                         } else { 
    447                                 authorE = $(authorEOrArray); 
    448                                 author  = authorE.text().replace(/^\s+|\??\s*$/g, ''); 
    449                         } 
    450  
    451                         var iconurl = TracUtils.AuthorIcons.getIconByAuthor(author); 
    452                         if (!iconurl) return; 
    453  
    454                         var img = $("<img width='16' height='16' alt='' class='committer-icon'/>") 
    455                                 .attr("src", iconurl) 
    456                                 .css("margin-right", "0.5em"); 
    457  
    458                         var a = $("<a style='background-image: none ! important; padding-left: 0pt; border: none;'/>") 
    459                                 .attr("href", TracUtils.AuthorIcons.getAuthorPage(author)) 
    460                                 .append(img); 
    461  
    462                         authorE.prepend(a); 
    463  
    464                         // workarround for IE 
    465                         if ($.browser.msie && $("#content").attr("class") == 'timeline') { 
    466                                 $(a).parent().css({backgroundColor: 'white'}); 
    467                         } 
    468                 } 
    469  
    470                 , getAuthorPage : function (author) { 
    471                         return TracUtils.TRAC_BASE + "/wiki/Committers/" + author; 
    472                 } 
    473         } 
     14        SVN_REPOS_BASE : 'http://svn.coderepos.org/share', 
     15        TRAC_BASE      : 'http://coderepos.org/share', 
     16        AUTHOR_ICONS   : { 
     17                //'tomoyo'       : 'http://www.hatena.ne.jp/users/ma/mayuki/profile_s.gif' 
     18                //'tomoyo'       : 'id:mayuki' 
     19                  '*default*'    : 'http://coderepos.org/share/htdocs/default-author-icon.png' 
     20                , 'mayuki'       : 'id:mayuki' 
     21                , 'yappo'        : 'id:yappo' 
     22                , 'typester'     : 'http://en.gravatar.com/avatar/fbc6511bcc0649366086c0445fb456d3?s=16'//'id:typester' 
     23                , 'kentaro'      : 'id:antipop' 
     24                , 'mizzy'        : 'id:gosukenator' 
     25                , 'charsbar'     : 'id:charsbar' 
     26                , 'secondlife'   : 'id:secondlife' 
     27                , 'kazeburo'     : 'id:kazeburo' 
     28                , 'otsune'       : 'id:otsune' 
     29                , 'hirose31'     : 'id:hirose31' 
     30                , 'nipotan'      : 'id:nipotan' 
     31                , 'itkz'         : 'id:ITKz' 
     32                , 'xcezx'        : 'id:xcezx' 
     33                , 'nyarla'       : 'id:nyarla-net' 
     34                , 'tokuhirom'    : 'id:tokuhirom' 
     35                , 'daisuke'      : 'id:lestrrat' 
     36                , 'kana'         : 'id:ka-nacht' 
     37                , 'cho45'        : 'id:cho45' 
     38                , 'kan'          : 'id:kan' 
     39                , 'zigorou'      : 'id:ZIGOROu' 
     40                , 'masaki'       : 'id:ikasam_a' 
     41                , 'holidays-l'   : 'id:holidays-l' 
     42                , 'yoko'         : 'id:yksk' 
     43                , 'mattn'        : 'id:mattn' 
     44                , 'lopnor'       : 'id:lopnor' 
     45                , 'gyuque'       : 'id:gyuque' 
     46                , 'yugui'        : 'id:yugui' 
     47                , 'akihito'      : 'id:t-akihito' 
     48                , 'fujiwara'     : 'id:sfujiwara' 
     49                , 'yusukebe'     : 'id:kamawada' 
     50                , 'miyagawa'     : 'id:miyagawa' 
     51                , 'topia'        : 'id:topia' 
     52                , 'woremacx'     : 'id:woremacx' 
     53                , 'amachang'     : 'id:amachang' 
     54                , 'takesako'     : 'id:TAKESAKO' 
     55                , 'eto'          : 'id:eto' 
     56                , 'dankogai'     : 'id:dankogai' 
     57                , 'jknaoya'      : 'id:jknaoya' 
     58                , 'yasu'         : 'id:hirata_yasuyuki' 
     59                , 'holygrail'    : 'id:HolyGrail' 
     60                , 'elim'         : 'id:elim' 
     61                , 'cheebow'      : 'id:cheebow' 
     62                , 'ariela'       : 'http://en.gravatar.com/avatar/dd5dfb5d738d5b5fb1c9a8b234945ea6?s=16'//'id:transrain' 
     63                , 'tomyhero'     : 'id:tomyhero' 
     64                , 'hetappi'      : 'id:hetappi' 
     65                , 'coji'         : 'id:coji' 
     66                , 'takemaru'     : 'id:teahut' 
     67                , 'akasata'      : 'id:akasata' 
     68                , 'okuryu'       : 'id:okuryu' 
     69                , 'tasuku'       : 'id:tasukuchan' 
     70                , 'snj14'        : 'id:snj14' 
     71                , 'shachi'       : 'id:shachi_kk' 
     72                , 'omoon'        : 'id:omoon' 
     73                , 'aerith'       : 'id:aerith' 
     74                , 'clouder'      : 'id:clouder' 
     75                , 'takkyun'      : 'id:simpleboxes' 
     76                , 'naoya_t'      : 'http://ntzone.info/misc/keroro.gif' 
     77                , 'takefumi'     : 'id:takefumi' 
     78                , 'walf443'      : 'id:walf443' 
     79                , 'psychs'       : 'id:Psychs' 
     80                , 'ewigkeit'     : 'id:Ewigkeit' 
     81                , 'yoshiori'     : 'id:Yoshiori' 
     82                , 'dev0000'      : 'http://www.developer0000.jp/16.jpg' 
     83                , 'machu'        : 'id:kmachu' 
     84                , 'norio_s'      : 'id:norio_s' 
     85                , 'hsbt'         : 'id:h-sbt' 
     86                , 'nori090'      : 'id:nori090' 
     87                , 'lyokato'      : 'id:lyokato' 
     88                , 'drgqst'       : 'id:drgqst' 
     89                , 'mrkn'         : 'id:mrkn' 
     90                , 'tfunato'      : 'id:tfunato' 
     91      &nbs