Changeset 512 for lang/javascript/trac

Show
Ignore:
Timestamp:
10/17/07 20:20:30 (6 years ago)
Author:
gyuque
Message:

lang/javascript/trac/TracAuthorIcon.js: added link to diary

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/trac/TracAuthorIcon.js

    r154 r512  
    9090        } 
    9191 
    92         if (TracAuthorIcon.getIconByAuthor(author)) { 
     92        var iconurl = TracAuthorIcon.getIconByAuthor(author); 
     93        if (iconurl) { 
    9394            var img = document.createElement('img'); 
    94             img.src = TracAuthorIcon.getIconByAuthor(author); 
     95            img.src = iconurl; 
    9596            img.alt = ''; 
    9697            img.style.marginRight = '0.5em'; 
    97             authorE.insertBefore(img, authorE.firstChild); 
     98 
     99            var a = document.createElement('a'); 
     100            a.href = TracAuthorIcon.getDiary(author); 
     101                        a.appendChild(img); 
     102 
     103            authorE.insertBefore(a, authorE.firstChild); 
    98104        } 
     105    } 
     106 
     107    , getDiary : function (author) { 
     108        return 'http://d.hatena.ne.jp/'+author; 
    99109    } 
    100110