1document.write("<style>.msgcookie{display:block;position:fixed;bottom:0;height:50px;width:100%;background:rgba(0,0,0,0.8);color:#fff;font-size:11px;font-family:sans-serif}.msgcookie p{width:960px;margin:0 auto;background:url(cookie.png) 0 0 no-repeat;padding:10px 0 0 30px}.msgcookie p a:link,.msgcookie p a:active,.msgcookie p a:visited,.msgcookie p a:hover{color:#fff}.msgcookie a.close{float:right;display:block;width:16px;height:50px;background:url(cookie.png) 0 -45px no-repeat;overflow:hidden;text-indent:-80px;opacity:0.5;margin:0 0 0 40px}a.close:hover{opacity:1}</style>"); 2 3/*! 4 * jQuery Cookie Plugin v1.4.0 5 * https://github.com/carhartl/jquery-cookie 6 * 7 * Copyright 2013 Klaus Hartl 8 * Released under the MIT license 9 */ 10(function (factory) { 11 if (typeof define === 'function' && define.amd) { 12 // AMD. Register as anonymous module. 13 define(['jquery'], factory); 14 } else { 15 // Browser globals. 16 factory(jQuery); 17 } 18}(function ($) { 19 20 var pluses = /\+/g; 21 22 function encode(s) { 23 return config.raw ? s : encodeURIComponent(s); 24 } 25 26 function decode(s) { 27 return config.raw ? s : decodeURIComponent(s); 28 } 29 30 function stringifyCookieValue(value) { 31 return encode(config.json ? JSON.stringify(value) : String(value)); 32 } 33 34 function parseCookieValue(s) { 35 if (s.indexOf('"') === 0) { 36 // This is a quoted cookie as according to RFC2068, unescape... 37 s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 38 } 39 40 try { 41 // Replace server-side written pluses with spaces. 42 // If we can't decode the cookie, ignore it, it's unusable. 43 // If we can't parse the cookie, ignore it, it's unusable. 44 s = decodeURIComponent(s.replace(pluses, ' ')); 45 return config.json ? JSON.parse(s) : s; 46 } catch (e) { 47 } 48 } 49 50 function read(s, converter) { 51 var value = config.raw ? s : parseCookieValue(s); 52 return $.isFunction(converter) ? converter(value) : value; 53 } 54 55 var config = $.cookie = function (key, value, options) { 56 57 // Write 58 if (value !== undefined && !$.isFunction(value)) { 59 options = $.extend({}, config.defaults, options); 60 61 if (typeof options.expires === 'number') { 62 var days = options.expires, t = options.expires = new Date(); 63 t.setDate(t.getDate() + days); 64 } 65 66 return (document.cookie = [ 67 encode(key), '=', stringifyCookieValue(value), 68 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 69 options.path ? '; path=' + options.path : '', 70 options.domain ? '; domain=' + options.domain : '', 71 options.secure ? '; secure' : '' 72 ].join('')); 73 } 74 75 // Read 76 77 var result = key ? undefined : {}; 78 79 // To prevent the for loop in the first place assign an empty array 80 // in case there are no cookies at all. Also prevents odd result when 81 // calling $.cookie(). 82 var cookies = document.cookie ? document.cookie.split('; ') : []; 83 84 for (var i = 0, l = cookies.length; i < l; i++) { 85 var parts = cookies[i].split('='); 86 var name = decode(parts.shift()); 87 var cookie = parts.join('='); 88 89 if (key && key === name) { 90 // If second argument (value) is a function it's a converter... 91 result = read(cookie, value); 92 break; 93 } 94 95 // Prevent storing a cookie that we couldn't decode. 96 if (!key && (cookie = read(cookie)) !== undefined) { 97 result[name] = cookie; 98 } 99 } 100 return result; 101 }; 102 config.defaults = { 103 path: "/", 104 }; 105 $.removeCookie = function (key, options) { 106 if ($.cookie(key) === undefined) { 107 return false; 108 } 109 // Must not alter options, thus extending a fresh object... 110 $.cookie(key, '', $.extend({}, options, {expires: -1})); 111 return !$.cookie(key); 112 }; 113})); 114 115 116 117$(document).ready(function ($) 118{ 119 var $msg = $("#CookiesMsg"); 120 121 if (!$.cookie("msgcookie")) 122 { 123 $msg.show(); 124 125 $msg.find(".close").click(function (e) { 126 e.preventDefault(); 127 $.cookie('msgcookie', 'aceptado'); 128 $(".msgcookie").fadeOut(); 129 }); 130 } 131 else 132 { 133 $msg.remove(); 134 } 135});
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.