1- // Copyright 2016, Google, Inc.
1+ // Copyright 2016 Google LLC
2+ //
23// Licensed under the Apache License, Version 2.0 (the "License");
34// you may not use this file except in compliance with the License.
45// You may obtain a copy of the License at
56//
6- // http ://www.apache.org/licenses/LICENSE-2.0
7+ // https ://www.apache.org/licenses/LICENSE-2.0
78//
89// Unless required by applicable law or agreed to in writing, software
910// distributed under the License is distributed on an "AS IS" BASIS,
@@ -19,7 +20,6 @@ $(function(){
1920 // backend's app.yaml file.
2021 var backendHostUrl = '<your-backend-url>' ;
2122
22- // [START gae_python_firenotes_config]
2323 // Obtain the following from the "Add Firebase to your web app" dialogue
2424 // Initialize Firebase
2525 var config = {
@@ -30,7 +30,6 @@ $(function(){
3030 storageBucket : "<BUCKET>.appspot.com" ,
3131 messagingSenderId : "<MESSAGING_SENDER_ID>"
3232 } ;
33- // [END gae_python_firenotes_config]
3433
3534 // This is passed into the backend to authenticate the user.
3635 var userIdToken = null ;
@@ -40,7 +39,6 @@ $(function(){
4039
4140 firebase . initializeApp ( config ) ;
4241
43- // [START gae_python_state_change]
4442 firebase . auth ( ) . onAuthStateChanged ( function ( user ) {
4543 if ( user ) {
4644 $ ( '#logged-out' ) . hide ( ) ;
@@ -67,11 +65,9 @@ $(function(){
6765
6866 }
6967 } ) ;
70- // [END gae_python_state_change]
7168
7269 }
7370
74- // [START gae_python_firebase_login]
7571 // Firebase log-in widget
7672 function configureFirebaseLoginWidget ( ) {
7773 var uiConfig = {
@@ -91,9 +87,7 @@ $(function(){
9187 var ui = new firebaseui . auth . AuthUI ( firebase . auth ( ) ) ;
9288 ui . start ( '#firebaseui-auth-container' , uiConfig ) ;
9389 }
94- // [END gae_python_firebase_login]
9590
96- // [START gae_python_fetch_notes]
9791 // Fetch notes from the backend.
9892 function fetchNotes ( ) {
9993 $ . ajax ( backendHostUrl + '/notes' , {
@@ -110,7 +104,6 @@ $(function(){
110104 } ) ;
111105 } ) ;
112106 }
113- // [END gae_python_fetch_notes]
114107
115108 // Sign out a user
116109 var signOutBtn = $ ( '#sign-out' ) ;
0 commit comments