mirror of
https://github.com/fergalmoran/chrometophone.git
synced 2025-12-22 09:41:51 +00:00
17 lines
639 B
JavaScript
17 lines
639 B
JavaScript
window.onload = function() {
|
|
// We may be called directly, as options, or as result of a
|
|
// redirect from OAuth1 flow
|
|
var params = ChromeExOAuth.getQueryStringParams();
|
|
if (params['chromeexoauthcallback'] == 'true') {
|
|
// End of the oauth request flow, get access token
|
|
oauth.initOAuthFlow(function(token, secret) {
|
|
chrome.extension.getBackgroundPage().initializeBrowserChannel();
|
|
window.location = 'help.html#just_signed_in';
|
|
});
|
|
} else {
|
|
oauth.initOAuthFlow(function(token, secret) {
|
|
chrome.extension.getBackgroundPage().initializeBrowserChannel();
|
|
});
|
|
}
|
|
};
|