1/*! 2 * jQuery Cookie Plugin v1.4.1 3 * https://github.com/carhartl/jquery-cookie 4 * 5 * Copyright 2013 Klaus Hartl 6 * Released under the MIT license 7 */ 8(function (factory) { 9 if (typeof define === "function" && define.amd) { 10 // AMD 11 define(["jquery"], factory); 12 } else if (typeof exports === "object") { 13 // CommonJS 14 factory(require("jquery")); 15 } else { 16 // Browser globals 17 factory(jQuery); 18 } 19})(function ($) { 20 var pluses = /\+/g; 21 function encode(s) { 22 return config.raw ? s : encodeURIComponent(s); 23 } 24 function decode(s) { 25 return config.raw ? s : decodeURIComponent(s); 26 } 27 function stringifyCookieValue(value) { 28 return encode(config.json ? JSON.stringify(value) : String(value)); 29 } 30 function parseCookieValue(s) { 31 if (s.indexOf('"') === 0) { 32 // This is a quoted cookie as according to RFC2068, unescape... 33 s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\"); 34 } 35 try { 36 // Replace server-side written pluses with spaces. 37 // If we can't decode the cookie, ignore it, it's unusable. 38 // If we can't parse the cookie, ignore it, it's unusable. 39 s = decodeURIComponent(s.replace(pluses, " ")); 40 return config.json ? JSON.parse(s) : s; 41 } catch (e) {} 42 } 43 function read(s, converter) { 44 var value = config.raw ? s : parseCookieValue(s); 45 return $.isFunction(converter) ? converter(value) : value; 46 } 47 var config = ($.cookie = function (key, value, options) { 48 // Write 49 if (value !== undefined && !$.isFunction(value)) { 50 options = $.extend({}, config.defaults, options); 51 if (typeof options.expires === "number") { 52 var days = options.expires, 53 t = (options.expires = new Date()); 54 t.setTime(+t + days * 864e5); 55 } 56 return (document.cookie = [ 57 encode(key), 58 "=", 59 stringifyCookieValue(value), 60 options.expires 61 ? "; expires=" + options.expires.toUTCString() 62 : "", // use expires attribute, max-age is not supported by IE 63 options.path ? "; path=" + options.path : "", 64 options.domain ? "; domain=" + options.domain : "", 65 options.secure ? "; secure" : "", 66 ].join("")); 67 } 68 // Read 69 var result = key ? undefined : {}; 70 // To prevent the for loop in the first place assign an empty array 71 // in case there are no cookies at all. Also prevents odd result when 72 // calling $.cookie(). 73 var cookies = document.cookie ? document.cookie.split("; ") : []; 74 for (var i = 0, l = cookies.length; i < l; i++) { 75 var parts = cookies[i].split("="); 76 var name = decode(parts.shift()); 77 var cookie = parts.join("="); 78 if (key && key === name) { 79 // If second argument (value) is a function it's a converter... 80 result = read(cookie, value); 81 break; 82 } 83 // Prevent storing a cookie that we couldn't decode. 84 if (!key && (cookie = read(cookie)) !== undefined) { 85 result[name] = cookie; 86 } 87 } 88 return result; 89 }); 90 config.defaults = {}; 91 $.removeCookie = function (key, options) { 92 if ($.cookie(key) === undefined) { 93 return false; 94 } 95 // Must not alter options, thus extending a fresh object... 96 $.cookie(key, "", $.extend({}, options, { expires: -1 })); 97 return !$.cookie(key); 98 }; 99}); 100/* Landscop Theme */ 101jQuery(document).ready(function () { 102 if (!jQuery("body").hasClass("bd-landing-page")) { 103 jQuery(".pxl-cookie-policy .pxl-item--close").click(function () { 104 jQuery(".pxl-cookie-policy").addClass("pxl-hidden"); 105 }); 106 jQuery(".pxl-subscribe-popup .pxl-popup--close").click(function () { 107 jQuery(".pxl-subscribe-popup").removeClass("pxl-active"); 108 }); 109 var visits = jQuery.cookie("visits") || 0; 110 visits++; 111 jQuery.cookie("visits", visits, { expires: 1, path: "/" }); 112 /* Cookie */ 113 if (jQuery.cookie("visits") > 1) { 114 jQuery(".pxl-cookie-policy").hide(); 115 } else { 116 jQuery(".pxl-cookie-policy").addClass("pxl-active"); 117 } 118 if (jQuery.cookie("noShowWelcome")) { 119 jQuery(".pxl-cookie-policy").hide(); 120 } 121 /* Subscribe */ 122 if (jQuery.cookie("visits") > 1) { 123 jQuery(".pxl-subscribe-popup").hide(); 124 } else { 125 setTimeout(function () { 126 jQuery(".pxl-subscribe-popup").addClass("pxl-active"); 127 }, 5000); 128 } 129 } 130});
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.