Files
chrometophone/extension/oauth_interstitial.js
burke.davey 7bad62e50c Event pages, and other cleanup.
Credits: Aaron Boodman
2013-07-27 02:41:26 +00:00

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();
});
}
};