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

Appearance settings

Commit 83de84e

Browse filesBrowse files
committed
make sure there are elements in details
1 parent ec199cc commit 83de84e
Copy full SHA for 83de84e

File tree

2 files changed

+7
-5
lines changed
Filter options

2 files changed

+7
-5
lines changed

‎coderstats/data/coderstats.js

Copy file name to clipboardExpand all lines: coderstats/data/coderstats.js
+5-3Lines 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
var url = 'http://coderstats.net/github/' + login.trim() + '/';
66
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+
}
1012
}
1113
}

‎coderstats/package.json

Copy file name to clipboardExpand all lines: coderstats/package.json
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.