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

Commit57b7792

Browse files
committed
fix#2 get rid of jquery, exclude paths like timeline, language etc.
1 parent72af4bb commit57b7792

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

‎coderstats/coderstats.js‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
varpath=document.location.pathname;
22
if(m=path.match(/^\/([\w-]+)\??.*?/)){
3-
varnick=m[1];
4-
varurl='http://cs.geeksta.net/github/'+$.trim(nick);$('.details').append('<dl><dt><span class="mini-icon mini-icon-link"></span></dt><dd><a href="'+url+'">Coderstats</a></dd></dl>');
3+
varlogin=m[1];
4+
if(-1===['timeline','languages','blog','explore'].indexOf(login)){
5+
varurl='http://cs.geeksta.net/github/'+login.trim();
6+
vardetails=document.getElementsByClassName('details');
7+
vardl=document.createElement('dl');
8+
dl.innerHTML='<dt><span class="mini-icon mini-icon-link"></span></dt><dd><a href="'+url+'">CoderStats(\''+login+'\')</a></dd>';
9+
details[0].appendChild(dl);
10+
}
511
}

‎coderstats/manifest.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"manifest_version":2,
3-
"version":"1.6",
3+
"version":"1.7",
44
"name":"Coderstats link for Github",
55
"description":"Display a link to the Coderstats page for the currently displayed user on github.com.",
66
"icons": {
@@ -9,7 +9,7 @@
99
},
1010
"content_scripts": [{
1111
"matches": ["https://github.com/*"],
12-
"js": ["vendor/jquery-2.0.0.min.js","coderstats.js"],
12+
"js": ["coderstats.js"],
1313
"run_at":"document_end"
1414
}]
1515
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp