PageSourceSearch

https://us.beruby.com/javascripts/cookies_checker.js?1790781323

js beruby.com collected 2026-10-01 09:00:09 UTC 1,081 bytes, 45 lines download raw bytes

1var CookiesChecker = function(options){
2};
3
4CookiesChecker.prototype.checkCookies = function(){
5	var deferred = jQuery.Deferred();
6
7	var self = this;
8	self.checkLocalCookies(deferred)
9	self.checkThirdPartyCookies(deferred);
10
11	return deferred;
12};
13
14CookiesChecker.prototype.checkLocalCookies = function(deferred){
15	var date = new Date();
16	jQuery.cookie('somecookie', date.getTime());
17	if(jQuery.cookie('somecookie') != date.getTime()){
18		deferred.reject('localCookies');
19	}
20
21	jQuery.cookie('somecookie', null);
22
23	return deferred;
24};
25
26CookiesChecker.prototype.checkThirdPartyCookies = function(deferred){
27	var image = new Image();
28	image.onerror = function(){
29		deferred.reject('connectionError')
30	};
31
32	image.onload = function(){
33		var image2 = new Image();
34		image2.onerror = function(){
35			deferred.reject('thirdCookies');
36		};
37
38		image2.onload = function(){
39			deferred.resolve(true);
40		};
41
42		image2.src = window.location.protocol + "//" + window.location.host + "/" + 'check_cookie';
43	};
44	image.src = window.location.protocol + "//" + window.location.host + "/" +'set_cookie';
45};

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.