File tree 3 files changed +15
-4
lines changed
3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,21 @@ if (m = path.match(/^\/([\w-]+)\??.*?/)) {
5
5
var url = 'http://coderstats.net/github/' + login . trim ( ) + '/' ;
6
6
var details = document . getElementsByClassName ( 'vcard-details' ) ;
7
7
if ( details . length > 0 ) {
8
+ var link = document . getElementsByClassName ( 'octicon-link' ) [ 0 ] ;
9
+
8
10
var li = document . createElement ( 'li' ) ;
9
- li . setAttribute ( 'class' , 'vcard-detail' ) ;
11
+ li . setAttribute ( 'class' , 'vcard-detail pt-1 ' ) ;
10
12
li . setAttribute ( 'itemprop' , 'url' ) ;
11
- li . innerHTML = '<span class="octicon octicon-link"></span><a href="' + url + '">CoderStats(\'' + login + '\')</a>' ;
13
+
14
+ var a = document . createElement ( 'a' ) ;
15
+ a . setAttribute ( 'href' , url ) ;
16
+ a . textContent = "CoderStats('" + login + "')" ;
17
+
18
+ var svg = link . cloneNode ( ) ;
19
+ svg . appendChild ( link . childNodes [ 0 ] . cloneNode ( ) )
20
+
21
+ li . appendChild ( svg ) ;
22
+ li . appendChild ( a ) ;
12
23
details [ 0 ] . appendChild ( li ) ;
13
24
}
14
25
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"manifest_version" : 2 ,
3
- "version" : " 1.14 " ,
3
+ "version" : " 1.15 " ,
4
4
"name" : " CoderStats link for Github Coders" ,
5
5
"description" : " Display a link to the CoderStats page for the currently displayed GitHub user when browsing github.com." ,
6
6
"icons" : {
You can’t perform that action at this time.
0 commit comments