PageSourceSearch

https://zadovoljna.com.hr/wp-content/plugins/push-me/js/push-init.js?v=1.1.107

js zadovoljna.com.hr collected 2026-10-02 13:42:13 UTC 5,716 bytes, 109 lines download raw bytes

1//nmd
2/*var config = {
3    apiKey: "AIzaSyDRuIHL6meYmYIqWBVonTPpBdJEQkaisuA",
4    authDomain: "fir-6fc1f.firebaseapp.com",
5    databaseURL: "https://fir-6fc1f.firebaseio.com",
6    projectId: "fir-6fc1f",
7    storageBucket: "fir-6fc1f.appspot.com",
8    messagingSenderId: "789817974766"
9};*/
10
11var _ANT_VAPID = "BMNU5W1iVKQ283hspDfGbybV5a7uPq2TR8cbTGOxPqNvNGDI05CyFh2C5vpvyt3WRADTIEGQlwXh6WFvsRLKJ5w";
12//---
13
14// cpy
15  //firebase.initializeApp(config);
16
17  var pushmeMessaging = null;
18  if ('Notification' in window) {
19	  try{
20		  
21		  /*pushmeMessaging = firebase.messaging();
22		  pushmeMessaging.onMessage(function(payload) {
23		  	  console.log('Message received. ', payload);
24		      var $ntf = jQuery("#pushme-pn-msg");
25		      jQuery("h3", $ntf).html(payload.notification.title + "<i class=\'fal fa-times\' onclick=\"jQuery(\'#pushme-pn-msg\').hide();\"></i>");
26		      jQuery(".body", $ntf).html(payload.notification.body);
27		      jQuery("a", $ntf).attr("href", payload.notification.click_action);
28		      jQuery(".img", $ntf).css("background-image", "url(" + payload.notification.icon + ")");
29		      $ntf.fadeIn();
30		  });*/
31
32		  invictumPushMe.init(_ANT_VAPID); //_OPERATERI_PN_VAPID_KEY
33		  
34		  jQuery(document).ready(function(){ 
35		      invictumPushMe.initOnDocLoad = true;
36		      
37		        var tpl = typeof(_ANT_PUSH_NOTIFICATION_TEMPLATE) == "undefined" ? 1 : _ANT_PUSH_NOTIFICATION_TEMPLATE;
38		        var tplVariation = typeof(_ANT_PUSH_NOTIFICATION_MOBILE_VARIATION) == "undefined" ? "mobile_buttons_new_line" : _ANT_PUSH_NOTIFICATION_MOBILE_VARIATION;
39		        
40		        var notifPushText = typeof(_ANT_PUSH_NOTIFICATION_TEXT) == "undefined" ? "Želite li primati naše novosti?" : _ANT_PUSH_NOTIFICATION_TEXT;
41		        var notifPushBtnYes = typeof(_ANT_PUSH_NOTIFICATION_BTN_YES) == "undefined" ? "DA" : _ANT_PUSH_NOTIFICATION_BTN_YES;
42		        var notifPushBtnNo = typeof(_ANT_PUSH_NOTIFICATION_BTN_NO) == "undefined" ? "NE" : _ANT_PUSH_NOTIFICATION_BTN_NO;
43		        
44		        var isEdge = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) && (/Edg/.test(navigator.userAgent));
45		        var isOpera = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) && (/OPR/.test(navigator.userAgent));
46		        var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) && !isEdge && !isOpera;
47		        var isFirefox = /Firefox/.test(navigator.userAgent);
48		        
49		        var showNotif = false;
50		        if(isEdge && typeof(_ANT_PUSH_NOTIFICATION_DISPL_FOR.edge) != "undefined" && parseInt(_ANT_PUSH_NOTIFICATION_DISPL_FOR.edge) == 1){
51		        	showNotif = true;
52		        }else if(isChrome && typeof(_ANT_PUSH_NOTIFICATION_DISPL_FOR.chrome) != "undefined" && parseInt(_ANT_PUSH_NOTIFICATION_DISPL_FOR.chrome) == 1){
53		        	showNotif = true;
54		        }else if(isFirefox && typeof(_ANT_PUSH_NOTIFICATION_DISPL_FOR.firefox) != "undefined" && parseInt(_ANT_PUSH_NOTIFICATION_DISPL_FOR.firefox) == 1){
55		        	showNotif = true;
56		        }else if(!isEdge && !isChrome && !isFirefox && typeof(_ANT_PUSH_NOTIFICATION_DISPL_FOR.others) != "undefined" && parseInt(_ANT_PUSH_NOTIFICATION_DISPL_FOR.others) == 1){
57		        	showNotif = true;
58		        }
59		        var elTp = jQuery("#wpadminbar").length > 0 ? jQuery("#wpadminbar").outerHeight() : 0;
60		        
61		        if(showNotif && Notification.permission !== "granted" && invictumPushMe.storageGet("push_notif_show_shwd") !== "yes"){
62		        	var $diviHeader = jQuery("#main-header");
63		        	if($diviHeader.length > 0){
64		        		jQuery("#main-header").before('<div id="ant-push-notif" class="ant-push-notif ant-push-notif-'+tpl+' ant-push-notif-'+tplVariation+'" style="top: '+elTp+'px; left: 0; right: 0;"><span>'+notifPushText+'</span><button type="button" onclick="invictumPushMe.permisionRequested = false; invictumPushMe.requestPermission(); _antPushNotifHide();">'+notifPushBtnYes+'</button> <button type="button" onclick="_antPushNotifHide();">'+notifPushBtnNo+'</button> </div>');
65			        	var h = jQuery("#ant-push-notif").outerHeight();
66			        	jQuery("#main-header").css("margin-top", h);
67			        	jQuery("body").css("padding-top", h);
68			        	
69			        	
70		        	}else{
71		        		jQuery("body").prepend('<div id="ant-push-notif" class="ant-push-notif ant-push-notif-'+tpl+' ant-push-notif-'+tplVariation+'" style="top: 0px; left: 0; right: 0;"><span>'+notifPushText+'</span><button type="button" onclick="invictumPushMe.permisionRequested = false; invictumPushMe.requestPermission(); _antPushNotifHide();">'+notifPushBtnYes+'</button> <button type="button" onclick="_antPushNotifHide();">'+notifPushBtnNo+'</button> </div>');
72		        		jQuery("body").css("padding-top", h);
73		        	}
74		        	
75		        	
76		        	setTimeout(_antPushNotifResize, 1000);
77		        	setTimeout(_antPushNotifResize, 1500);
78		        	setTimeout(_antPushNotifResize, 2000);
79		        }else{
80		        	invictumPushMe.requestPermission();
81		        }
82		  });
83	  }catch(e){
84		  console.log(e);
85	  }
86  }
87  
88 
89  function _antPushNotifHide()
90  {
91	  var $diviHeader = jQuery("#main-header");
92	  if($diviHeader.length > 0){
93		  var h = jQuery("#ant-push-notif").outerHeight();
94		  jQuery("#main-header").css("margin-top", 0);
95	  }
96	  jQuery("body").css("padding-top", 0);
97	  jQuery("#ant-push-notif").hide();
98	  invictumPushMe.storageSet("push_notif_show_shwd", "yes");
99  }
100  
101  function _antPushNotifResize()
102  {
103	  if(jQuery("#ant-push-notif").css("display") == "block"){
104		  var h = jQuery("#ant-push-notif").outerHeight();
105		  jQuery("#main-header").css("margin-top", h);
106	  	  jQuery("body").css("padding-top", h);
107	  }
108  }
109 //--

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.