Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

userAgent string for nodejs client

  • Loading branch information...
commit 430785dac06c2890f7bc05ddc2825e9e3cb30e13 1 parent 3c712d2
@rksm rksm authored
View
2  client/swank-js.js
@@ -35,7 +35,7 @@ if (isNode) {
global.Completion = require('../Completion').Completion;
global.swank_printStackTrace = require('./stacktrace').swank_printStackTrace;
window = global;
- window.navigator = {userAgent: "nodejs swank client"};
+ window.navigator = {userAgent: "nodejs-swank-client"};
window.eval = function(code) {
return vm.runInThisContext(code, 'SwankJS node client');
}
View
2  package.json
@@ -22,7 +22,7 @@
"swank-js": "./swank.js"
},
"dependencies": {
- "socket.io": ">=0.8.7",
+ "socket.io": ">=0.9",
"socket.io-client": ">=0.9"
},
"scripts": {
View
1  user-agent-tests.js
@@ -76,6 +76,7 @@ var USER_AGENT_TESTS = [
[ "MSIE 2.0", "Mozilla/1.22 (compatible; MSIE 2.0d; Windows NT)" ],
[ "MSIE 1.5", "Mozilla/1.22 (compatible; MSIE 1.5; Windows NT)" ],
[ "MSIE 1.0", "Mozilla/1.0 (compatible; MSIE 1.0; Windows 3.11)" ], // made up
+ [ "nodejs/external", "nodejs-swank-client" ],
[ "unknown", "don't know" ],
[ "unknown", "" ]
];
View
3  user-agent.js
@@ -39,7 +39,8 @@ var RX_TABLE = [
[ /^.*Qt\/(\d+\.\d+).*$/, "QtWeb $1" ],
[ /^.*WebKit.*$/, "WebKit" ],
[ /^.*Gecko.*$/, "Gecko" ],
- [ /^.*MSIE (\d+\.\d+).*$/, "MSIE $1" ]
+ [ /^.*MSIE (\d+\.\d+).*$/, "MSIE $1" ],
+ [ /^nodejs-swank-client$/, "nodejs/external" ]
];
exports.recognize = function recognize (name) {

0 comments on commit 430785d

Please sign in to comment.
Something went wrong with that request. Please try again.