virsical-jssdk
Advanced tools
Comparing version 0.1.9 to 0.1.10
23
index.js
@@ -14,2 +14,3 @@ ;(function (global, factory) { | ||
var _platform_ios = 2; | ||
var _platform_mac = 3; | ||
@@ -31,4 +32,6 @@ | ||
return _platform_android; | ||
}else if(!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)){ | ||
}else if(!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) { | ||
return _platform_ios; | ||
}else if(!!u.match(/Mac OS X/)) { | ||
return _platform_mac; | ||
}else{// 其他设备 | ||
@@ -42,7 +45,7 @@ return _platform_other; | ||
Virsical.config = function(info){ | ||
if(getPlatform()==_platform_android){ | ||
var platform = getPlatform(); | ||
if(platform == _platform_android){ | ||
window.control.config(info.debug, info.client_id, info.client_secret); | ||
isDebugger = info.debug; | ||
}else if(getPlatform()==_platform_ios){ | ||
}else if(platform==_platform_ios || platform == _platform_mac ){ | ||
//TODO ios | ||
@@ -94,7 +97,7 @@ window.location.href = 'vsk3browser://config?'+'debug='+info.debug+'&'+'clientid='+info.client_id+'&'+'clientsecret='+info.client_secret; | ||
// loginTimer = setTimeout(loginTimeout(), login_timeout_during); | ||
var platform = getPlatform(); | ||
if(getPlatform()==_platform_android){ | ||
if(platform==_platform_android){ | ||
window.control.login(); | ||
}else if(getPlatform()==_platform_ios){ | ||
}else if(platform==_platform_ios || platform == _platform_mac){ | ||
//TODO ios | ||
@@ -216,6 +219,6 @@ window.location.href = 'vsk3browser://login'; | ||
workspaceFailCallback = callbackFunction.fail; | ||
if(getPlatform()==_platform_android){ | ||
var platform = getPlatform(); | ||
if(platform==_platform_android){ | ||
window.captureqr.scan(); | ||
}else if(getPlatform()==_platform_ios){ | ||
}else if(platform==_platform_ios || platform == _platform_mac){ | ||
//TODO ios | ||
@@ -222,0 +225,0 @@ window.location.href = 'vsk3browser://captureqr'; |
{ | ||
"name": "virsical-jssdk", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"description": "Virsical 3.0 JS SDK", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
9924
223