mozilla/talkilla — pull request #291 by Standard8 (2013-11-01 16:27:56+00:00)
Title: Get the import contacts button working nicely and update the client key so that import works on non-localhost

This is a minimal PR that should fix the import contacts button not working at all on staging and production.

It also fixes it so that you don't have to click the button twice - gapi.auth.init does some set-up for browsers to avoid the popup blockers, but requires that a) it be called before authorize b) not from the button click that is also used for authorize.

There's a few things I don't like about it how we do things, i.e. we always need to call init on sidebar load, and we also always have a window come up even if a background get the key would have worked.

However, we can address those in future PRs. For now, this just gets the button working and doing something.