PageSourceSearch

https://www.ridetego.com/assets/website/js/firebase_notification.js?time=1790902494

js ridetego.com collected 2026-10-02 00:55:26 UTC 2,315 bytes, 80 lines download raw bytes

1var firebaseConfig = {
2	apiKey: "AIzaSyAU3V86k2_p-HVbitZjaCz1qQDRmZXDTlM",
3    authDomain: "tego-ec8cd.firebaseapp.com",
4    databaseURL: "https://tego-ec8cd.firebaseio.com",
5    projectId: "tego-ec8cd",
6    storageBucket: "tego-ec8cd.appspot.com",
7    messagingSenderId: "1088694144070",
8    appId: "1:1088694144070:web:d5a2fbf32f2ee3a2b30e47"
9};
10firebase.initializeApp(firebaseConfig);
11
12const messaging = firebase.messaging();
13console.log("messaging",messaging);
14
15function startFCM() {
16	console.log("startFCM");
17	messaging.requestPermission()
18	.then(function () {
19		console.log('Notification permission granted.',messaging.getToken());
20		// get the token in the form of promise
21		return messaging.getToken();
22	})
23	.then(function (token) {
24		console.log("notification_token",token);
25		document.getElementById('notification_token').value = token;
26		document.getElementById('web_push_token').value = token;
27	})
28	.catch(function (err) {
29		console.log('Unable to get permission to notify.', err);
30	});
31}
32
33messaging.onMessage(function(payload) {
34
35	console.log("payload.data.badgeCount",payload);
36
37	const title = payload.notification.title;
38	console.log(payload);
39	const options = {
40		body: payload.notification.body,
41		icon: BASE_URL + 'assets/website/images/tego-logo.png',         
42	};
43	var message =  new Notification(title, options);
44
45	if($("#booking_id").val() !== "" && $("#driver_id").val() !== ""){
46
47		let options = {
48		    timeZone: 'America/Chicago',
49		    year: 'numeric',
50		    month: 'numeric',
51		    day: 'numeric',
52		    hour: 'numeric',
53		    minute: 'numeric',
54		    second: 'numeric',
55		  },
56  		formatter = new Intl.DateTimeFormat([], options);
57
58		var new_date = formatter.format(new Date());
59
60
61		var chat_message=$('#display_chat_history');
62		var chat_html = '<div class="chat-box-body-receive"><p>'+payload.notification.body+'</p><span>'+new_date+'</span></div>';
63
64            chat_message.append(chat_html);
65		chat_message.scrollTop(chat_message.prop('scrollHeight'));
66
67
68		// $("#display_chat_history").append(html);
69	}
70
71	if(title == "Session Expired"){
72	    window.location.reload();
73	  }
74
75	// message.addEventListener("click", function (event) {
76	// 	event.preventDefault();
77	// 	window.open(BaseUrl);
78	// });
79});
80

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.