Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brunos3d/firebase-messaging-sw.js
💬 JAVASCRIPT - Firebase service worker with custom icon and "fallback icon", notification click_action and custom data.
https://github.com/brunos3d/firebase-messaging-sw.js
action click cloud fcm firebase javascript messaging monkey-patch notification push service-worker web
Last synced: 5 days ago
JSON representation
💬 JAVASCRIPT - Firebase service worker with custom icon and "fallback icon", notification click_action and custom data.
- Host: GitHub
- URL: https://github.com/brunos3d/firebase-messaging-sw.js
- Owner: brunos3d
- License: mit
- Created: 2021-05-11T17:30:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T15:08:35.000Z (6 months ago)
- Last Synced: 2024-05-20T17:40:55.915Z (6 months ago)
- Topics: action, click, cloud, fcm, firebase, javascript, messaging, monkey-patch, notification, push, service-worker, web
- Language: JavaScript
- Homepage:
- Size: 39.1 KB
- Stars: 18
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# firebase-messaging-sw.js
💬 JAVASCRIPT - Firebase service worker with custom icon and "fallback icon", notification click_action and custom data.Extracted and modified from
https://github.com/firebase/quickstart-js/issues/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](https://user-images.githubusercontent.com/21183964/118019538-7acca980-b32f-11eb-9aa2-a8240e9c6b49.png)
### 🖱️ 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](https://github.com/BrunoS3D/firebase-messaging-sw.js/blob/main/image.png)