Skip to content

💬 JAVASCRIPT - Firebase service worker with custom icon and "fallback icon", notification click_action and custom data.

License

Notifications You must be signed in to change notification settings

brunos3d/firebase-messaging-sw.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

firebase-messaging-sw.js

💬 JAVASCRIPT - Firebase service worker with custom icon and "fallback icon", notification click_action and custom data.

Extracted and modified from

firebase/quickstart-js#71

🖼️ Icon

You can pass an icon through the Firebase interface, otherwise the default icon will be YOUR_APP_DOMAIN/icons/firebase-logo.png

image

🖱️ Click action

click_action is an optional parameter that must be entered in the notification panel of firebase cloud messaging as shown below. When clicking on the notification, the user will be redirected to the link informed as the value of the click_action parameter, if the parameter is not informed the user will be redirected to the host of the application

image

About

💬 JAVASCRIPT - Firebase service worker with custom icon and "fallback icon", notification click_action and custom data.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published