Skip to content

Commit e7f1a91

Browse files
committed
testling and travis
1 parent 78257b5 commit e7f1a91

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![browser support](https://ci.testling.com/darvin/github.png)](https://ci.testling.com/darvin/github)
2+
13
# Github.js
24

35
Github.js provides a minimal higher-level wrapper around git's [plumbing commands](http://git-scm.com/book/en/Git-Internals-Plumbing-and-Porcelain), exposing an API for manipulating GitHub repositories on the file level. It is being developed in the context of [Prose](http://prose.io), a content editor for GitHub.

github.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@
1515
_ = require('underscore');
1616
Base64 = require('./lib/base64.js');
1717
}else{
18-
XMLHttpRequest = window.XMLHttpRequest;
1918
_ = window._;
2019
Base64 = window.Base64;
2120
}
21+
//prefer native XMLHttpRequest always
22+
if (typeof window !== 'undefined' && typeof window.XMLHttpRequest !== 'undefined'){
23+
XMLHttpRequest = window.XMLHttpRequest;
24+
}
2225

2326

2427
var API_URL = 'https://api.github.com';

package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,20 @@
2929
"gitHead": "aa8aa3c8cd5ce5240373d4fd1d06a7ab4af41a36",
3030
"bugs": {
3131
"url": "https://github.com/darvin/github/issues"
32+
},
33+
"browser": {
34+
"xmlhttprequest": false
35+
},
36+
"testling": {
37+
"files": "test/*_test.js",
38+
"browsers": {
39+
"ie": [ 8, 9 ],
40+
"firefox": [ 13 ],
41+
"chrome": [ 20 ],
42+
"safari": [ 5.1 ],
43+
"opera": [ 12 ]
44+
},
45+
"harness": "mocha"
3246
}
47+
3348
}

0 commit comments

Comments
 (0)