File tree 2 files changed +7
-5
lines changed
Filter options
2 files changed +7
-5
lines changed
Original file line number Diff line number Diff line change @@ -4,8 +4,10 @@ if (m = path.match(/^\/([\w-]+)\??.*?/)) {
4
4
if ( - 1 === [ 'timeline' , 'languages' , 'blog' , 'explore' ] . indexOf ( login ) ) {
5
5
var url = 'http://coderstats.net/github/' + login . trim ( ) + '/' ;
6
6
var details = document . getElementsByClassName ( 'details' ) ;
7
- var dl = document . createElement ( 'dl' ) ;
8
- dl . innerHTML = '<dt><span class="octicon octicon-link"></span></dt><dd><a href="' + url + '">CoderStats(\'' + login + '\')</a></dd>' ;
9
- details [ 0 ] . appendChild ( dl ) ;
7
+ if ( details . length > 0 ) {
8
+ var dl = document . createElement ( 'dl' ) ;
9
+ dl . innerHTML = '<dt><span class="octicon octicon-link"></span></dt><dd><a href="' + url + '">CoderStats(\'' + login + '\')</a></dd>' ;
10
+ details [ 0 ] . appendChild ( dl ) ;
11
+ }
10
12
}
11
13
}
Original file line number Diff line number Diff line change 5
5
"description" : " Display a link to the CoderStats page for the currently displayed GitHub user when browsing github.com." ,
6
6
"author" : " CoderStats" ,
7
7
"license" : " MIT" ,
8
- "version" : " 0.1 " ,
8
+ "version" : " 0.2 " ,
9
9
"homepage" : " http://coderstats.net/" ,
10
10
"icon64" : " static/logo-64x64.png"
11
- }
11
+ }
You can’t perform that action at this time.
0 commit comments