Plugin Directory

Changeset 2906513


Ignore:
Timestamp:
05/01/2023 11:02:07 AM (3 years ago)
Author:
vuukle
Message:

Updated firebase service worker to fix an error

Location:
free-comments-for-wordpress-vuukle/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • free-comments-for-wordpress-vuukle/trunk/free-comments-for-wordpress-vuukle.php

    r2894753 r2906513  
    1919 * Plugin URI:        https://vuukle.com
    2020 * Description:       Vuukle is the smartest commenting platform that offers AI-powered commenting, Unique Sharing tool bar, Emoji reaction widget and real time analytics with just one click. Customize all you want, make your pages load faster and experience user engagement like never before!
    21  * Version:           5.1.5
     21 * Version:           5.1.6
    2222 * Author:            Vuukle
    2323 * Author URI:        https://vuukle.com
     
    7272 */
    7373function Run_Free_Comments_For_Wordpress_vuukle() {
    74     $plugin = new Free_Comments_For_Wordpress_Vuukle( '5.1.5', plugin_dir_path( __FILE__ ), plugin_dir_url( __FILE__ ), plugin_basename( __FILE__ ) );
     74    $plugin = new Free_Comments_For_Wordpress_Vuukle( '5.1.6', plugin_dir_path( __FILE__ ), plugin_dir_url( __FILE__ ), plugin_basename( __FILE__ ) );
    7575    $plugin->run();
    7676}
  • free-comments-for-wordpress-vuukle/trunk/public/js/firebase-messaging-sw.js

    r2855171 r2906513  
    1 self.addEventListener('notificationclick', function (event) {
    2     const url = event.notification.data.FCM_MSG.notification.click_action;
    3     event.notification.close();
    4     const appUrl = `${url}`;
    5     event.waitUntil(self.clients.openWindow(appUrl));
    6 });
    7 
    8 // Scripts for firebase and firebase messaging
    9 importScripts(
    10     'https://www.gstatic.com/firebasejs/9.6.5/firebase-app-compat.js',
    11 );
    12 importScripts(
    13     'https://www.gstatic.com/firebasejs/9.6.5/firebase-messaging-compat.js',
    14 );
    15 
    16 // Initialize the Firebase app in the service worker by passing the generated config
    17 const firebaseConfig = {
    18     apiKey: 'AIzaSyAntpQydRNSCd17c0dxdyKPOMcHR4R5M8U',
    19     authDomain: 'vuukle-push-notifications.firebaseapp.com',
    20     projectId: 'vuukle-push-notifications',
    21     storageBucket: 'vuukle-push-notifications.appspot.com',
    22     messagingSenderId: '994174897627',
    23     appId: '1:994174897627:web:95b04960af61be1a4dabfe',
    24     measurementId: 'G-8ZJKS6SK9Y',
    25 };
    26 
    27 firebase.initializeApp(firebaseConfig);
    28 
    29 // Retrieve firebase messaging
    30 const messaging = firebase.messaging();
    31 
    32 messaging.onBackgroundMessage(function (payload) {
    33     console.log('background message', payload);
    34 });
     1if (typeof importScripts === 'function') {
     2    self.addEventListener('notificationclick', function (event) {
     3        const url = event.notification.data.FCM_MSG.notification.click_action;
     4        event.notification.close();
     5        const appUrl = `${url}`;
     6        event.waitUntil(self.clients.openWindow(appUrl));
     7    });
     8   
     9    // Scripts for firebase and firebase messaging
     10    importScripts(
     11        'https://www.gstatic.com/firebasejs/9.21.0/firebase-app-compat.js',
     12    );
     13    importScripts(
     14        'https://www.gstatic.com/firebasejs/9.21.0/firebase-messaging-compat.js',
     15    );
     16   
     17    // Initialize the Firebase app in the service worker by passing the generated config
     18    const firebaseConfig = {
     19        apiKey: 'AIzaSyAntpQydRNSCd17c0dxdyKPOMcHR4R5M8U',
     20        authDomain: 'vuukle-push-notifications.firebaseapp.com',
     21        projectId: 'vuukle-push-notifications',
     22        storageBucket: 'vuukle-push-notifications.appspot.com',
     23        messagingSenderId: '994174897627',
     24        appId: '1:994174897627:web:95b04960af61be1a4dabfe',
     25        measurementId: 'G-8ZJKS6SK9Y',
     26    };
     27   
     28    firebase.initializeApp(firebaseConfig);
     29   
     30    // Retrieve firebase messaging
     31    const messaging = firebase.messaging();
     32   
     33    messaging.onBackgroundMessage(function (payload) {
     34        console.log('background message', payload);
     35    });
     36}
  • free-comments-for-wordpress-vuukle/trunk/readme.txt

    r2894753 r2906513  
    44Requires at least: 2.0.2
    55Tested up to: 6.1.1
    6 Stable tag: 5.1.5
     6Stable tag: 5.1.6
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    295295== Changelog ==
    296296
     297= 5.1.6 =
     298* Update Web Push service worker
     299
    297300= 5.1.5 =
    298301
Note: See TracChangeset for help on using the changeset viewer.