mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactored
This commit is contained in:
parent
a537c56e46
commit
ebeffdc16e
8 changed files with 133 additions and 79 deletions
|
|
@ -3,22 +3,25 @@
|
|||
<head></head>
|
||||
<body>
|
||||
<script>
|
||||
(function(){
|
||||
|
||||
var Util;
|
||||
(function(Util){
|
||||
"use strict";
|
||||
|
||||
if(window.opener){
|
||||
var cloudcmd = window.opener.CloudCommander;
|
||||
|
||||
cloudcmd.getConfig(function(pConfig){
|
||||
var lGitHub = pConfig.github,
|
||||
GitHub_ID = lGitHub && lGitHub.key;
|
||||
cloudcmd.getModules(function(pModules){
|
||||
var lStorage = Util.findObjByNameInArr(pModules, 'storage'),
|
||||
lGitHub = Util.findObjByNameInArr(lStorage.data, 'GitHub'),
|
||||
GitHub_ID = lGitHub && lGitHub.key;
|
||||
|
||||
window.location =
|
||||
'https://github.com/login/oauth/authorize?client_id=' +
|
||||
GitHub_ID + '&&scope=repo,user,gist';
|
||||
});
|
||||
}
|
||||
})();
|
||||
})(Util);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue