https://t.me/AnonymousX5
Server : Apache/2.4.52 (Ubuntu)
System : Linux vps-b5787e30 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : zeljko ( 1002)
PHP Version : 8.2.25
Disable Function : NONE
Directory :  /var/www/html/winidoc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/winidoc/firebase-messaging-sw.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');
// For an optimal experience using Cloud Messaging, also add the Firebase SDK for Analytics.
importScripts(
    "https://www.gstatic.com/firebasejs/7.16.1/firebase-analytics.js",
);

// Initialize the Firebase app in the service worker by passing in the
// messagingSenderId.
firebase.initializeApp({
    apiKey: "AIzaSyCS4a-ecc2yoMpz131yPSYLOf5gSBpWfsA",
    authDomain: "youmedoc-722c0.firebaseapp.com",
    databaseURL: "https://youmedoc-722c0.firebaseio.com",
    projectId: "youmedoc-722c0",
    storageBucket: "youmedoc-722c0.appspot.com",
    messagingSenderId: "491351834466",
    appId: "1:491351834466:web:c8ddb714d5f2980ef2363b",
    measurementId: "G-3H07F7X3V3"

});

// Retrieve an instance of Firebase Messaging so that it can handle background
// messages.
const messaging = firebase.messaging();



messaging.onBackgroundMessage((payload) => {
    //console.log('[firebase-messaging-sw.js] Received background message ', payload);
    // Customize notification here
    const notificationTitle = payload.notification.title;
    const notificationOptions = {
        body: payload.notification.body,
        icon: payload.notification.icon,
    };

    Sound();

    self.registration.showNotification(notificationTitle, notificationOptions);
});


function Sound()
{
    this.source = 'https://winidoc.com/sound/alerte.mp3';
    this.volume = 100;
    this.loop = false;
    var son;
    this.son = son;
    this.finish = false;
    this.stop = function()
    {
        document.body.removeChild(this.son);
    }
    this.start = function()
    {
        if (this.finish) return false;
        this.son = document.createElement("embed");
        this.son.setAttribute("src", this.source);
        this.son.setAttribute("hidden", "true");
        this.son.setAttribute("volume", this.volume);
        this.son.setAttribute("autostart", "true");
        this.son.setAttribute("loop", this.loop);
        document.body.appendChild(this.son);
    }
    this.remove = function()
    {
        document.body.removeChild(this.son);
        this.finish = true;
    }
    this.init = function(volume, loop)
    {
        this.finish = false;
        this.volume = volume;
        this.loop = loop;
    }
}

https://t.me/AnonymousX5 - 2025