module.exports = do ->
	new Promise (resolve) ->
		gApiReady = ->
			gapi.load 'client:auth2', ->
				gapi.client.init({
					apiKey: 'AIzaSyDNHyaQxinEYqwuGTTy1pJeEC09ewAxNNM',
					clientId: '30789742875.apps.googleusercontent.com',
					discoveryDocs: ["https://www.googleapis.com/discovery/v1/apis/drive/v3/rest"],
					scope: 'https://www.googleapis.com/auth/drive'
				}).then resolve

		po = document.createElement('script');
		po.type = 'text/javascript'; po.async = true;
		po.src = 'https://apis.google.com/js/api.js'
		po.onload = gApiReady

		s = document.getElementsByTagName('script')[0];
		s.parentNode.insertBefore(po, s);
