Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit83de84e

Browse files
committed
make sure there are elements in details
1 parentec199cc commit83de84e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

‎coderstats/data/coderstats.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ if (m = path.match(/^\/([\w-]+)\??.*?/)) {
44
if(-1===['timeline','languages','blog','explore'].indexOf(login)){
55
varurl='http://coderstats.net/github/'+login.trim()+'/';
66
vardetails=document.getElementsByClassName('details');
7-
vardl=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+
vardl=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+
}
1012
}
1113
}

‎coderstats/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description":"Display a link to the CoderStats page for the currently displayed GitHub user when browsing github.com.",
66
"author":"CoderStats",
77
"license":"MIT",
8-
"version":"0.1",
8+
"version":"0.2",
99
"homepage":"http://coderstats.net/",
1010
"icon64":"static/logo-64x64.png"
11-
}
11+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp