Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f4f56e6

Browse files
committed
show link icon
1 parent 7974615 commit f4f56e6

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

coderstats/coderstats.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,21 @@ if (m = path.match(/^\/([\w-]+)\??.*?/)) {
55
var url = 'http://coderstats.net/github/' + login.trim() + '/';
66
var details = document.getElementsByClassName('vcard-details');
77
if (details.length > 0) {
8+
var link = document.getElementsByClassName('octicon-link')[0];
9+
810
var li = document.createElement('li');
9-
li.setAttribute('class', 'vcard-detail');
11+
li.setAttribute('class', 'vcard-detail pt-1');
1012
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);
1223
details[0].appendChild(li);
1324
}
1425
}

coderstats/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"manifest_version": 2,
3-
"version": "1.14",
3+
"version": "1.15",
44
"name": "CoderStats link for Github Coders",
55
"description": "Display a link to the CoderStats page for the currently displayed GitHub user when browsing github.com.",
66
"icons": {

promo_small.svg

+1-1
Loading

0 commit comments

Comments
 (0)