PageSourceSearch

https://directiv.ru/files/jquery.cookie.js

js directiv.ru collected 2026-10-07 19:39:55 UTC 4,456 bytes, 152 lines download raw bytes

vendor: 4,076 bytes, lines 1-137
1var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
2if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
3{
4  let window = _____WB$wombat$assign$function_____("window");
5  let self = _____WB$wombat$assign$function_____("self");
6  let document = _____WB$wombat$assign$function_____("document");
7  let location = _____WB$wombat$assign$function_____("location");
8  let top = _____WB$wombat$assign$function_____("top");
9  let parent = _____WB$wombat$assign$function_____("parent");
10  let frames = _____WB$wombat$assign$function_____("frames");
11  let opener = _____WB$wombat$assign$function_____("opener");
12
13/*!
14 * jQuery Cookie Plugin v1.4.1
15 * https://github.com/carhartl/jquery-cookie
16 *
17 * Copyright 2013 Klaus Hartl
18 * Released under the MIT license
19 */
20(function (factory) {
21	if (typeof define === 'function' && define.amd) {
22		// AMD
23		define(['jquery'], factory);
24	} else if (typeof exports === 'object') {
25		// CommonJS
26		factory(require('jquery'));
27	} else {
28		// Browser globals
29		factory(jQuery);
30	}
31}(function ($) {
32
33	var pluses = /\+/g;
34
35	function encode(s) {
36		return config.raw ? s : encodeURIComponent(s);
37	}
38
39	function decode(s) {
40		return config.raw ? s : decodeURIComponent(s);
41	}
42
43	function stringifyCookieValue(value) {
44		return encode(config.json ? JSON.stringify(value) : String(value));
45	}
46
47	function parseCookieValue(s) {
48		if (s.indexOf('"') === 0) {
49			// This is a quoted cookie as according to RFC2068, unescape...
50			s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
51		}
52
53		try {
54			// Replace server-side written pluses with spaces.
55			// If we can't decode the cookie, ignore it, it's unusable.
56			// If we can't parse the cookie, ignore it, it's unusable.
57			s = decodeURIComponent(s.replace(pluses, ' '));
58			return config.json ? JSON.parse(s) : s;
59		} catch(e) {}
60	}
61
62	function read(s, converter) {
63		var value = config.raw ? s : parseCookieValue(s);
64		return $.isFunction(converter) ? converter(value) : value;
65	}
66
67	var config = $.cookie = function (key, value, options) {
68
69		// Write
70
71		if (value !== undefined && !$.isFunction(value)) {
72			options = $.extend({}, config.defaults, options);
73
74			if (typeof options.expires === 'number') {
75				var days = options.expires, t = options.expires = new Date();
76				t.setTime(+t + days * 864e+5);
77			}
78
79			return (document.cookie = [
80				encode(key), '=', stringifyCookieValue(value),
81				options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
82				options.path    ? '; path=' + options.path : '',
83				options.domain  ? '; domain=' + options.domain : '',
84				options.secure  ? '; secure' : ''
85			].join(''));
86		}
87
88		// Read
89
90		var result = key ? undefined : {};
91
92		// To prevent the for loop in the first place assign an empty array
93		// in case there are no cookies at all. Also prevents odd result when
94		// calling $.cookie().
95		var cookies = document.cookie ? document.cookie.split('; ') : [];
96
97		for (var i = 0, l = cookies.length; i < l; i++) {
98			var parts = cookies[i].split('=');
99			var name = decode(parts.shift());
100			var cookie = parts.join('=');
101
102			if (key && key === name) {
103				// If second argument (value) is a function it's a converter...
104				result = read(cookie, value);
105				break;
106			}
107
108			// Prevent storing a cookie that we couldn't decode.
109			if (!key && (cookie = read(cookie)) !== undefined) {
110				result[name] = cookie;
111			}
112		}
113
114		return result;
115	};
116
117	config.defaults = {};
118
119	$.removeCookie = function (key, options) {
120		if ($.cookie(key) === undefined) {
121			return false;
122		}
123
124		// Must not alter options, thus extending a fresh object...
125		$.cookie(key, '', $.extend({}, options, { expires: -1 }));
126		return !$.cookie(key);
127	};
128
129}));
130
131
132}
133/*
134     FILE ARCHIVED ON 00:54:33 Nov 18, 2018 AND RETRIEVED FROM THE
135     INTERNET ARCHIVE ON 19:21:27 Sep 20, 2024.
136     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
137
138     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
139     SECTION 108(a)(3)).
140*/
141/*
142playback timings (ms):
143  captures_list: 0.676
144  exclusion.robots: 0.022
145  exclusion.robots.policy: 0.011
146  esindex: 0.016
147  cdx.remote: 5.681
148  LoadShardBlock: 132.869 (6)
149  PetaboxLoader3.datanode: 141.509 (8)
150  load_resource: 341.797 (2)
151  PetaboxLoader3.resolve: 286.446 (2)
152*/

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.