Changeset 20839 for websites

Show
Ignore:
Timestamp:
10/06/08 14:54:53 (2 months ago)
Author:
drry
Message:
Files:
1 modified

Legend:

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

    r20837 r20839  
    141141                , 'syttru'         : 'id:syttru' 
    142142                , 'iskwrsk'        : 'id:iskwrsk' 
    143                 , 'komatsuna'      : 'http://data.tumblr.com/avatar_82a9ef4053ec_30.gif' 
     143                , 'komatsuna'      : 'http://data.tumblr.com/avatar_82a9ef4053ec_16.gif' 
    144144                , 'tarchan'        : 'id:tarchan' 
    145145                , 'tyoro'          : 'id:tyoro1210' 
     
    473473 
    474474                , getIconByAuthor : function (author) { 
    475                         var iconUrl = TracUtils.AUTHOR_ICONS[author]; 
    476                         if (iconUrl) { 
    477                                 // Hatena ID 
    478                                 return 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") 
    479                                 // livedoor ID 
    480                                 //            .replace(/^ld:([a-z][a-z0-9_]{2,19})$/, "http://image.profile.livedoor.jp/icon/$1_16.gif") 
    481                                 // Wassr ID 
    482                                 //            .replace(/^wassr:([a-z0-9][-a-z0-9_]{1,18}[a-z0-9])$/, "http://wassr.jp/user/$1/profile_img.png.16"); 
     475                        var iconUrl = TracUtils.AUTHOR_ICONS[author] || TracUtils.AUTHOR_ICONS["*default*"]; 
     476                        if (iconUrl.indexOf("http") == 0) { 
     477                                return iconUrl; 
    483478                        } 
    484                         return TracUtils.AUTHOR_ICONS["*default*"]; 
     479                        // Hatena ID 
     480                        return 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") 
     481                        // livedoor ID 
     482                        //            .replace(/^ld:([a-z][a-z0-9_]{2,19})$/, "http://image.profile.livedoor.jp/icon/$1_16.gif") 
     483                        // Wassr ID 
     484                        //            .replace(/^wassr:([a-z0-9][-a-z0-9_]{1,18}[a-z0-9])$/, "http://wassr.jp/user/$1/profile_img.png.16"); 
    485485                } 
    486486