1/*! 2 * jQuery Cookie Plugin 3 * https://github.com/carhartl/jquery-cookie 4 * 5 * Copyright 2011, Klaus Hartl 6 * Dual licensed under the MIT or GPL Version 2 licenses. 7 * http://www.opensource.org/licenses/mit-license.php 8 * http://www.opensource.org/licenses/GPL-2.0 9 */ (function ($) { 10 $.cookie = function (key, value, options) { 11 12 // key and at least value given, set cookie... 13 if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { 14 options = $.extend({}, options); 15 16 if (value === null || value === undefined) { 17 options.expires = -1; 18 } 19 20 if (typeof options.expires === 'number') { 21 var days = options.expires, 22 t = options.expires = new Date(); 23 t.setDate(t.getDate() + days); 24 } 25 26 value = String(value); 27 28 return (document.cookie = [ 29 encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 30 options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : ''].join('')); 31 } 32 33 // key and possibly options given, get cookie... 34 options = value || {}; 35 var decode = options.raw ? 36 function (s) { 37 return s; 38 } : decodeURIComponent; 39 40 var pairs = document.cookie.split('; '); 41 for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { 42 if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined 43 } 44 return null; 45 }; 46})(jQuery);
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.