Socket
Socket
Sign inDemoInstall

clevertap-web-sdk

Package Overview
Dependencies
Maintainers
5
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clevertap-web-sdk - npm Package Compare versions

Comparing version 1.7.1 to 1.7.2

3

CHANGELOG.md
# Change Log
All notable changes to this project will be documented in this file.
## [1.7.2] - 2 Apr, 2024
- Fixes a bug in service worker file having deeplink issue
## [1.7.1] - 1 Apr, 2024

@@ -5,0 +8,0 @@ - Fixes a bug where clevertap script was not working due to dependency added for PE

2

package.json
{
"name": "clevertap-web-sdk",
"version": "1.7.1",
"version": "1.7.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "clevertap.js",

@@ -48,2 +48,3 @@ /* eslint-disable handle-callback-err */

if (typeof data !== 'undefined') {
data.wzrk_id += `_${new Date().getTime()}`
key = data.wzrk_id

@@ -50,0 +51,0 @@ }

@@ -1,1 +0,1 @@

!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){"use strict";if(importScripts("https://d2r1yp2w7bby2u.cloudfront.net/js/localforage.min.js"),void 0===t)var n,t;function o(n,t,o){var e=t,c=!0;"action1"===n.action?(void 0!==o.notificationOptions.actions[0].deepLink&&(e+="&r="+encodeURIComponent(o.notificationOptions.actions[0].deepLink),c=!1),e+="&b="+encodeURIComponent("button1")):"action2"===n.action?(void 0!==o.notificationOptions.actions[1].deepLink&&(e+="&r="+encodeURIComponent(o.notificationOptions.actions[1].deepLink),c=!1),e+="&b="+encodeURIComponent("button2")):(void 0!==o.deepLink&&(e+="&r="+encodeURIComponent(o.deepLink),c=!1),e+="&b="+encodeURIComponent("button0")),c?i(e):clients.openWindow(e),n.notification.close()}self.addEventListener("install",(function(n){self.skipWaiting(),console.log("CT Service worker installed")})),self.addEventListener("activate",(function(n){console.log("CT Service worker activated")})),self.addEventListener("push",(function(o){console.log("Push event: ",o);var i,e=JSON.parse(o.data.text()),c=e.title,a=e.notificationOptions,d=a.data;void 0!==d&&(i=d.wzrk_id),void 0===i&&(i=c),localforage.setItem(i,o.data.text()).then((function(n){})).catch((function(n){console.log("Error in persisting")})),t=e.redirectPath,n=e;var s=e.raiseNotificationViewedPath;void 0!==s&&fetch(s,{mode:"no-cors"}),o.waitUntil(self.registration.showNotification(c,a))})),self.addEventListener("notificationclick",(function(i){var e,c=i.notification,a=c.data;null!=a&&(e=a.wzrk_id),void 0===e&&(e=c.title);var d=localforage.getItem(e).then((function(n){var t=JSON.parse(n),e=t.redirectPath;o(i,e,t)})).catch((function(e){o(i,t,n),console.log(e)}));i.waitUntil(d)}));var i=function(n){fetch(n+="&s=true",{mode:"no-cors"})}}));
!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){"use strict";if(importScripts("https://d2r1yp2w7bby2u.cloudfront.net/js/localforage.min.js"),void 0===t)var n,t;function o(n,t,o){var e=t,c=!0;"action1"===n.action?(void 0!==o.notificationOptions.actions[0].deepLink&&(e+="&r="+encodeURIComponent(o.notificationOptions.actions[0].deepLink),c=!1),e+="&b="+encodeURIComponent("button1")):"action2"===n.action?(void 0!==o.notificationOptions.actions[1].deepLink&&(e+="&r="+encodeURIComponent(o.notificationOptions.actions[1].deepLink),c=!1),e+="&b="+encodeURIComponent("button2")):(void 0!==o.deepLink&&(e+="&r="+encodeURIComponent(o.deepLink),c=!1),e+="&b="+encodeURIComponent("button0")),c?i(e):clients.openWindow(e),n.notification.close()}self.addEventListener("install",(function(n){self.skipWaiting(),console.log("CT Service worker installed")})),self.addEventListener("activate",(function(n){console.log("CT Service worker activated")})),self.addEventListener("push",(function(o){console.log("Push event: ",o);var i,e=JSON.parse(o.data.text()),c=e.title,a=e.notificationOptions,d=a.data;void 0!==d&&(d.wzrk_id+="_".concat((new Date).getTime()),i=d.wzrk_id),void 0===i&&(i=c),localforage.setItem(i,o.data.text()).then((function(n){})).catch((function(n){console.log("Error in persisting")})),t=e.redirectPath,n=e;var r=e.raiseNotificationViewedPath;void 0!==r&&fetch(r,{mode:"no-cors"}),o.waitUntil(self.registration.showNotification(c,a))})),self.addEventListener("notificationclick",(function(i){var e,c=i.notification,a=c.data;null!=a&&(e=a.wzrk_id),void 0===e&&(e=c.title);var d=localforage.getItem(e).then((function(n){var t=JSON.parse(n),e=t.redirectPath;o(i,e,t)})).catch((function(e){o(i,t,n),console.log(e)}));i.waitUntil(d)}));var i=function(n){fetch(n+="&s=true",{mode:"no-cors"})}}));

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc