Skip to content

Commit eb37e89

Browse files
committed
Updating proxy url
1 parent 2f58719 commit eb37e89

File tree

5 files changed

+266
-12
lines changed

5 files changed

+266
-12
lines changed

Gitgraph.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Gitgraph uses [Grunt](http://gruntjs.com) for file linting and uglification. To
3333
```bash
3434
git clone https://github.com/bitpshr/Gitgraph.git
3535
cd Gitgraph
36-
git submodules update --recursive --init
36+
git submodule update --recursive --init
3737
npm install
3838
# hack on Gitgraph.js, run `grunt`, view demo/index.html
3939
```

src/Gitgraph.concat.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ var Gitgraph = (function (args) {
352352

353353
// Build our request url (need to proxy bc GitHub has
354354
// not exposed this data via the API yet; they plan to
355-
var proxy = "http://bitpshr.info/cdn/ba-simple-proxy.php",
355+
var proxy = "http://cdn.bitpshr.net/simple-proxy/simple-proxy.php",
356356
params = "?url=https://github.com/" + args.user + "/" + args.repo + "/graphs/owner_participation";
357357

358358
// Fetch participation data
@@ -361,8 +361,8 @@ var Gitgraph = (function (args) {
361361
xhr.onreadystatechange = function () {
362362
if(xhr.readyState==4 && xhr.status==200) {
363363
var data = JSON.parse( xhr.responseText );
364-
if(data.contents && data.contents.all){
365-
var total = data.contents.all,
364+
if(data && data.all){
365+
var total = data.all,
366366
repo = "https://github.com/"+args.user+"/"+args.repo+"/";
367367

368368
// build canvas
@@ -411,8 +411,8 @@ var Gitgraph = (function (args) {
411411
render(total[i], i);
412412
}
413413
c.fillStyle = userColor;
414-
for(i=0, len=data.contents.owner.length; i<len; i++){
415-
render(data.contents.owner[i], i);
414+
for(i=0, len=data.owner.length; i<len; i++){
415+
render(data.owner[i], i);
416416
}
417417
}
418418
}

src/Gitgraph.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var Gitgraph = (function (args) {
3131

3232
// Build our request url (need to proxy bc GitHub has
3333
// not exposed this data via the API yet; they plan to
34-
var proxy = "http://bitpshr.info/cdn/ba-simple-proxy.php",
34+
var proxy = "http://cdn.bitpshr.net/simple-proxy/simple-proxy.php",
3535
params = "?url=https://github.com/" + args.user + "/" + args.repo + "/graphs/owner_participation";
3636

3737
// Fetch participation data
@@ -40,8 +40,8 @@ var Gitgraph = (function (args) {
4040
xhr.onreadystatechange = function () {
4141
if(xhr.readyState==4 && xhr.status==200) {
4242
var data = JSON.parse( xhr.responseText );
43-
if(data.contents && data.contents.all){
44-
var total = data.contents.all,
43+
if(data && data.all){
44+
var total = data.all,
4545
repo = "https://github.com/"+args.user+"/"+args.repo+"/";
4646

4747
// build canvas
@@ -90,8 +90,8 @@ var Gitgraph = (function (args) {
9090
render(total[i], i);
9191
}
9292
c.fillStyle = userColor;
93-
for(i=0, len=data.contents.owner.length; i<len; i++){
94-
render(data.contents.owner[i], i);
93+
for(i=0, len=data.owner.length; i<len; i++){
94+
render(data.owner[i], i);
9595
}
9696
}
9797
}

0 commit comments

Comments
 (0)