1(function ($) { 2 function setArmCookie(name, c_val) { 3 if (c_val == '1') { 4 createArmCookie(name, 'true', ''); 5 //location.reload(); 6 } else { 7 if (getArmCookie(name) == 'true') { 8 createArmCookie(name, 'false', ''); 9 //location.reload(); 10 } 11 } 12 } 13 14 function getArmCookie(a) { 15 for ( 16 var b = a + '=', c = document.cookie.split(';'), d = 0; 17 d < c.length; 18 d++ 19 ) { 20 for (var e = c[d]; ' ' == e.charAt(0); ) e = e.substring(1); 21 if (0 == e.indexOf(b)) return e.substring(b.length, e.length); 22 } 23 return ''; 24 } 25 26 function createArmCookie(a, b, c) { 27 if (c) { 28 var d = new Date(); 29 d.setTime(d.getTime() + 24 * c * 60 * 60 * 1000); 30 var e = '; expires=' + d.toGMTString(); 31 } else var e = ''; 32 document.cookie = a + '=' + b + e + '; path=/'; 33 34 var today = new Date(); 35 var expire = new Date(); 36 expire.setTime(today.getTime() + 3600000 * 24 * 14); 37 document.cookie = 38 a + '=' + b + ';expires=' + expire.toGMTString() + ' path=/'; 39 } 40 41 $.fn.armAllowCookies = function (options) { 42 var domain = $('<a>').attr('href', document.location.href).prop('hostname'); 43 44 var armallowcookies = getArmCookie('armallowcookies'); 45 46 var defaults = { 47 armmessage: 48 'NaÅ¡a spletna stran uporablja piÅ¡kotke, ki vam omogoÄajo boljÅ¡o uporabniÅ¡ko izkuÅ¡njo in delovanje spletne strani.', 49 armhref: '', 50 //armreadmore: "<a href='https://"+domain+"/uporaba-piskotkov/'>Preberi veÄ</a>", 51 armreadmore: 52 "<a style='color:#DF2B2A;' href='https://www.butanplin.si/piskotki/'>Preberi veÄ</a>", 53 fixed: true, 54 animate: true, 55 odpri: false, 56 }; 57 58 var options = $.extend(defaults, options); 59 60 var html = 61 '<div class="armcookielaw"><style>' + 62 '.armcookielaw {' + 63 ' box-shadow: 0 0 20px rgb(0 0 0 / 30%); background: rgba(255,255,255,.95); ' + 64 ' background-repeat: repeat-x; ' + 65 ' bottom:0; right:0; left:0; ' + 66 ' font-family: "Montserrat", Sans-serif;' + 67 ' font-size: 15px; ' + 68 ' font-weight: 400; ' + 69 ' z-index: 2000; ' + 70 ' width: 100%; ' + 71 ' position: absolute; ' + 72 ' display: none; ' + 73 ' line-height: 14px; '; 74 75 if (options.fixed) { 76 html = html + ' position: fixed; '; 77 } 78 79 html = 80 html + 81 '} ' + 82 '.armcookielaw p { ' + 83 ' padding: 10px 0 0 0; ' + 84 ' margin: 0; ' + 85 ' float: left; ' + 86 ' color: #5f5346; ' + 87 ' line-height: 28px; ' + 88 '} ' + 89 '.armcookielaw .armallowcookies { ' + 90 ' background-repeat: no-repeat; ' + 91 ' width: 50px; ' + 92 ' height: 25px; ' + 93 ' float: right; ' + 94 ' margin-top: 10px; ' + 95 ' padding: 5px 5px 0 15px; ' + 96 ' text-decoration: none; ' + 97 ' color: #584F4D; ' + 98 '} ' + 99 '.armcookielaw .armcookiesmoreinfo { ' + 100 ' background-repeat: no-repeat; ' + 101 ' width: 70px; ' + 102 ' height: 20px; ' + 103 ' float: right; ' + 104 ' margin-top: 10px; ' + 105 ' padding: 5px 5px 0 5px; ' + 106 ' text-decoration: none; ' + 107 ' color: #584F4D; font-size: 11px; ' + 108 '} ' + 109 '.armcookielaw .armallowcookies:hover, .armcookielaw .armcookiesmoreinfo:hover { text-decoration: none; color: #a2a2a2; } ' + 110 '.armcookielaw .armcookiecontainer { margin: auto; position: relative; padding:20px;} ' + 111 '.armcookielawbg { height: 47px; display:none; } ' + 112 '.armcookielaw .armcookiebubble { ' + 113 ' background-repeat: no-repeat; ' + 114 ' position: absolute; ' + 115 ' width: 500px; ' + 116 ' height: 569px; ' + 117 ' right: -15px; ' + 118 ' top: -520px; ' + 119 ' padding: 10px 24px 0 24px; ' + 120 ' display: none; ' + 121 ' cursor: pointer; border: 0px solid white; ' + 122 '} ' + 123 '.armcookiebubble .armcookietitle { ' + 124 ' font-family: "Montserrat", Sans-serif; ' + 125 ' font-size: 11px; ' + 126 ' font-weight: normal; ' + 127 ' margin-bottom: 10px; ' + 128 ' color: #000000; ' + 129 '} ' + 130 '.armcookie_content { line-height: 30px; }' + 131 '.armcookie_img { width: 150px; float: left; margin-right: 40px; margin-bottom: 10px; }' + 132 '.armcookie-options { padding: 20px 0 20px 0; }' + 133 '.armcookie-options label { cursor: pointer;border: 1px solid rgba(0,0,0,.1);
133border-right: none;float: left;margin: 0;padding: 0 20px;line-height: 44px; }' + 134 '.armcookie-options label:last-of-type { border-right: 1px solid rgba(0,0,0,.1); margin-right: 30px;}' + 135 '.arm_cookie_btn { cursor:pointer; float: left; padding: 0 20px;line-height: 44px; margin-right: 30px; text-align: center; } ' + 136 '.arm_cookie_btn.btn_1 { background-color: #95C11E; color:#fff; } ' + 137 '.arm_cookie_btn.btn_2 { background: rgba(0,0,0,.1); } ' + 138 '@media (max-width: 900px){ .armcookie-options label {display:block; width: 90%; border-right: 1px solid rgba(0,0,0,.1);} }' + 139 '@media (max-width: 1024px){ .arm_cookie_btn {margin-top:20px;} }' + 140 '@media (max-width: 425px){ .armcookie_img { display:none; } .armcookie_content {line-height: 20px;} .arm_cookie_btn {width:unset;} }' + 141 '@media (max-width: 768px){ .armcookie_img img { width:100px; } .armcookie_img { margin-right: 10px; } }' + 142 '</style> ' + 143 '<div class="armcookiecontainer">' + 144 "<div class='armcookie_img'><img src='https://trgovina.butanplin.si/wp-content/plugins/piskotki/cookies_2.png'></div>" + 145 "<div class='armcookie_content'>" + 146 options.armmessage + 147 '</div>' + 148 "<div class='armcookie_content'>" + 149 options.armreadmore + 150 '</div>' + 151 "<div class='armcookie-options'>" + 152 "<label><input onclick='return false;' type='checkbox' value='1' name='func_cookies' id='func_cookies' checked> Nujni in funkcionalni piÅ¡kotki</label>" + 153 "<label><input type='checkbox' value='1' name='analytics_cookies' id='analytics_cookies'> AnalitiÄni piÅ¡kotki</label>" + 154 "<label><input type='checkbox' value='1' name='ads_cookies' id='ads_cookies'> MarketinÅ¡ki piÅ¡kotki</label>" + 155 /*"<label><input type='checkbox' value='1' name='social_cookies' id='social_cookies'> PiÅ¡kotki družabnih omrežij</label>" +*/ 156 "<div id='arm_c_save' class='arm_cookie_btn btn_2'>✔ Sprejmi izbrane</div>" + 157 "<div id='arm_c_allowall' class='arm_cookie_btn btn_1'>✔ Sprejmi vse</div>" + 158 '</div>' + 159 "<div style='clear:both;'></div>" + 160 '</div>' + 161 '</div><!-- armcookielaw -->' + 162 '<div class="armcookielawbg"></div>'; 163 164 //Check if cookie exists 165 //console.log(options.odpri); 166 if (armallowcookies == 'true' && options.odpri !== true) { 167 armCookieInit(); 168 } else { 169 $(this).prepend(html); 170 171 if (options.animate) { 172 $('.armcookielaw').slideDown('slow'); 173 } else { 174 $('.armcookielaw').show(); 175 $('.armcookielawbg').show(); 176 } 177 178 armCookieInit(); 179 } 180 }; 181 182 function armCookieInit() { 183 //default 184 185 if ( 186 getArmCookie('analytics_cookies') != 'true' && 187 getArmCookie('ads_cookies') != 'true' 188 ) { 189 consentDefault(); 190 } 191 192 //nastavitve 193 if (getArmCookie('analytics_cookies') == 'true') { 194 $('#analytics_cookies').prop('checked', true); 195 consentGrantedAnalytics(); 196 } else { 197 //consentDeniedAnalytics(); 198 } 199 if (getArmCookie('ads_cookies') == 'true') { 200 $('#ads_cookies').prop('checked', true); 201 consentGrantedAds(); 202 } else { 203 //consentDeniedAds(); 204 } 205 if (getArmCookie('social_cookies') == 'true') { 206 $('#social_cookies').prop('checked', true); 207 } 208 209 ///// akcije 210 $('#arm_c_save').click(function () { 211 setArmCookie('armallowcookies', '1'); 212 $('.armcookielaw').hide('slow'); 213 location.reload(); 214 }); 215 216 $('#arm_c_allowall').click(function () { 217 saveConsent('all cookies - granted'); 218 setArmCookie('armallowcookies', '1'); 219 setArmCookie('analytics_cookies', '1'); 220 setArmCookie('ads_cookies', '1'); 221 setArmCookie('social_cookies', '1'); 222 $('.armcookielaw').hide('slow'); 223 location.reload(); 224 }); 225 226 $('#analytics_cookies').click(function () { 227 if ($('input#analytics_cookies').prop('checked')) { 228 setArmCookie('analytics_cookies', '1'); 229 consentGrantedAnalytics(); 230 saveConsent('analytic - granted'); 231 } else { 232 setArmCookie('analytics_cookies', '0'); 233 consentDeniedAnalytics(); 234 saveConsent('analytic - denied'); 235 } 236 });
237 238 $('#ads_cookies').click(function () { 239 if ($('input#ads_cookies').prop('checked')) { 240 setArmCookie('ads_cookies', '1'); 241 consentGrantedAds(); 242 saveConsent('ads - granted'); 243 } else { 244 setArmCookie('ads_cookies', '0'); 245 consentDeniedAds(); 246 saveConsent('ads - denied'); 247 } 248 }); 249 250 $('#social_cookies').click(function () { 251 if ($('input#social_cookies').prop('checked')) { 252 setArmCookie('social_cookies', '1'); 253 } else { 254 setArmCookie('social_cookies', '0'); 255 } 256 }); 257 } 258 259 function consentGrantedAnalytics() { 260 window.dataLayer = window.dataLayer || []; 261 function gtag() { 262 dataLayer.push(arguments); 263 } 264 gtag('consent', 'update', { 265 analytics_storage: 'granted', 266 }); 267 console.log('analytics granted'); 268 } 269 270 function consentGrantedAds() { 271 window.dataLayer = window.dataLayer || []; 272 function gtag() { 273 dataLayer.push(arguments); 274 } 275 gtag('consent', 'update', { 276 ad_storage: 'granted', 277 }); 278 console.log('ads granted'); 279 } 280 281 function consentDeniedAnalytics() { 282 window.dataLayer = window.dataLayer || []; 283 function gtag() { 284 dataLayer.push(arguments); 285 } 286 gtag('consent', 'update', { 287 analytics_storage: 'denied', 288 }); 289 console.log('analytics denied'); 290 } 291 292 function consentDeniedAds() { 293 window.dataLayer = window.dataLayer || []; 294 function gtag() { 295 dataLayer.push(arguments); 296 } 297 gtag('consent', 'update', { 298 ad_storage: 'denied', 299 }); 300 console.log('ads denied'); 301 } 302 303 function consentDefault() { 304 window.dataLayer = window.dataLayer || []; 305 function gtag() { 306 dataLayer.push(arguments); 307 } 308 gtag('consent', 'default', { 309 ad_storage: 'denied', 310 analytics_storage: 'denied', 311 }); 312 } 313 314 function saveConsent(consent) { 315 var domain = window.location.hostname; 316 $.ajax({
317 type: 'POST', 318 url: 'https://trgovina.butanplin.si/cookie_consent/actions.php', 319 data: { action: 'save_consent', domain: domain, consent: consent }, 320 success: function (data) {}, 321 }); 322 } 323})(jQuery); 324 325jQuery().ready(function ($) { 326 $('body').armAllowCookies(); 327 $('.arm_cookie_settings').click(function () { 328 $('body').armAllowCookies( 329 (options = { 330 odpri: true, 331 }), 332 ); 333 }); 334});
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.