Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/public/firebase-messaging-sw.js
Назад
// Give the service worker access to Firebase Messaging. // Note that you can only use Firebase Messaging here. Other Firebase libraries // are not available in the service worker.importScripts('https://www.gstatic.com/firebasejs/7.23.0/firebase-app.js'); importScripts('https://www.gstatic.com/firebasejs/8.3.2/firebase-app.js'); importScripts('https://www.gstatic.com/firebasejs/8.3.2/firebase-messaging.js'); /* Initialize the Firebase app in the service worker by passing in the messagingSenderId. */ firebase.initializeApp({ apiKey: "AIzaSyDZl2hRU60LVUxIExYQOSThkubF4hCJ2l8", authDomain: "somni-5470e.firebaseapp.com", projectId: "somni-5470e", storageBucket: "somni-5470e.appspot.com", messagingSenderId: "479279133405", appId: "1:479279133405:web:d5aafcd870646df253e134", measurementId: "G-CSBJ2P0R5R" }); // Retrieve an instance of Firebase Messaging so that it can handle background // messages. const messaging = firebase.messaging(); messaging.setBackgroundMessageHandler(function(payload) { // console.log("Message received.", payload); const title = "Hello world is awesome"; const options = { body: "Your notificaiton message .", icon: "/firebase-logo.png", }; return self.registration.showNotification( title, options, ); });
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка