File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -3,17 +3,6 @@ importScripts('https://www.gstatic.com/firebasejs/8.10.0/firebase-messaging.js')
3
3
4
4
const urlParams = new URLSearchParams ( location . search )
5
5
const firebaseConfig = Object . fromEntries ( urlParams . entries ( ) )
6
- firebase . initializeApp ( firebaseConfig )
7
6
8
- if ( firebase . messaging . isSupported ( ) ) {
9
- const messaging = firebase . messaging ( )
10
- messaging . onBackgroundMessage ( ( payload ) => {
11
- const notificationTitle = payload . notification . title
12
- const notificationOptions = {
13
- body : payload . notification . body ,
14
- tag : notificationTitle ,
15
- icon : payload . notification ?. image
16
- }
17
- self . registration . showNotification ( notificationTitle , notificationOptions )
18
- } )
19
- }
7
+ firebase . initializeApp ( firebaseConfig )
8
+ firebase . messaging ( ) // Listen to incoming notifications by initializing messaging
You can’t perform that action at this time.
0 commit comments