mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-01 03:16:56 -05:00
16 lines
537 B
CoffeeScript
16 lines
537 B
CoffeeScript
module.exports = initializeGoogle = ->
|
|
onGPlusLoaded = ->
|
|
Backbone.Mediator.publish "gapi-loaded"
|
|
return
|
|
signinCallback = (authResult) ->
|
|
Backbone.Mediator.publish "gplus-logged-in", authResult if authResult["access_token"]
|
|
return
|
|
(->
|
|
po = document.createElement("script")
|
|
po.type = "text/javascript"
|
|
po.async = true
|
|
po.src = "https://apis.google.com/js/client:plusone.js?onload=onGPlusLoaded"
|
|
s = document.getElementsByTagName("script")[0]
|
|
s.parentNode.insertBefore po, s
|
|
return
|
|
)()
|