PageSourceSearch

https://www.d.co.il/Scripts/PushNotifications/thinMain.min.js

js d.co.il collected 2026-10-02 07:42:02 UTC 2,125 bytes, 3 lines download raw bytes

1const applicationServerPublicKey="BAVIs-xeRG-sDP3s2L6ltf8deCMeh83Rkox-DPcB6lIUpXs_my-ZP6A7XVMqvlTwKHTPLgmuzmaSe2HF5_gzqm8";let isSubscribed=!1,swRegistration=null;function urlB64ToUint8Array(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),i=window.atob(t),n=new Uint8Array(i.length);for(let e=0;e<i.length;++e)n[e]=i.charCodeAt(e);return n}function initialiseUI(){swRegistration.pushManager.getSubscription().then(function(e){(isSubscribed=!(null===e))?console.log("User IS subscribed."):console.log("User is NOT subscribed."),isSubscribed||subscribeUser()})}function subscribeUser(){const e=urlB64ToUint8Array(applicationServerPublicKey);swRegistration.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:e}).then(function(e){updateSubscriptionOnServer(e),isSubscribed=!0}).catch(function(e){console.log("Failed to subscribe the user: ",e)})}function postAjax(e,t,i){var n="string"==typeof t?t:Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&"),s=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");return s.open("POST",e),s.onreadystatechange=function(){s.readyState>3&&200==s.status&&i(s.responseText)},s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.setRequestHeader("Content-Type","application/json"),s.send(n),s}
2//!!!!!! very important to use YOUR SiteId !!!!!!
3function updateSubscriptionOnServer(e){if(e){var t={Subscription:e,UserAgent:navigator.userAgent,SiteId:0};"True"==$("html").data("is-production")?postAjax("https://api.zap360.co.il/api/push/subscribe",JSON.stringify(t),function(e){console.log(e)}):postAjax("https://apitest.zap360.co.il/api/push/subscribe",JSON.stringify(t),function(e){console.log(e)})}}"serviceWorker"in navigator&&"PushManager"in window&&Notification&&"denied"!=Notification.permission?Notification.requestPermission().then(function(e){"denied"!=e&&navigator.serviceWorker.register("/Scripts/PushNotifications/sw.js").then(function(e){swRegistration=e,initialiseUI(),e.update()}).catch(function(e){})}):console.warn("Push messaging is not supported");

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.