code: function initClient() {
  
      var scope = "https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/genomics https://www.googleapis.com/auth/devstorage.read_only https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/drive.readonly";
  
      let browser;
  
      igv.google.loadGoogleProperties("https://s3.amazonaws.com/igv.org.app/web_client_google")
  
          .then(function (properties) {
  
              return gapi.client.init({
                  'clientId': properties["client_id"],
                  'scope': scope
              });
          })
          
          .then(function (ignore) {
              gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);
          })
  
          .then(function () {
  
              var div, options;
  
              div = $("#myDiv")[0];
              options = {
                  genome: "hg19",
                  apiKey: igv.google.properties["api_key"],
                  queryParametersSupported: true
              };
  
              igv.createBrowser(div, options)
                  .then(function (b) {
                      igv.browser = b;
                  })
  
              
          })
  
      //
      // function handleSignInClick(event) {
      //     // Nothing to do
      // }
  
      function updateSigninStatus(isSignedIn) {
  
          if (isSignedIn) {
              //$("#signInButton").hide();
  
              var user = gapi.auth2.getAuthInstance().currentUser.get();
              var profile = user.getBasicProfile();
              var username = profile.getName();
              $("#switchUserLink").html("Logged in as: " + username);
  
          }
  
      }
  
  }
docs: Created by jrobinso on 6/2/18.