test/dummy/tmp/cache/assets/D45/C10/sprockets%2Fac34f7046872aba24b7375de608d8fe6 in evercookie-0.0.3 vs test/dummy/tmp/cache/assets/D45/C10/sprockets%2Fac34f7046872aba24b7375de608d8fe6 in evercookie-0.0.4
- old
+ new
@@ -1,11 +1,11 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1347364748.3483524:@value"Ãj{I"
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1362480766.1250265:@value"Ãl{I"
class:EFI"ProcessedAsset; FI"logical_path; FI"evercookie/evercookie.js; FI"
pathname; FI"b/home/daddy/www/evercookie/evercookie_gem/app/assets/javascripts/evercookie/evercookie.js.erb; FI"content_type; FI"application/javascript; FI"
-mtime; FI"2012-09-11T14:52:19+03:00; FI"length; Fi{gI"digest; F"%d41b5fbfd9c32f86bdaac90cd1e5457fI"source; FI"{g/*
+mtime; FI"2012-09-12T14:53:11+03:00; FI"length; Fi{iI"digest; F"%b15693aa7bd95c84d56b41ddba76b885I"source; FI"{i/*
* USAGE:
- var ec = new ecc();
+ var ec = new evercookie();
ec.set("id", "12345");
ec.get("id", function(value) { alert("value is " + value) });
*/
var _ec_tests = 10; //1000
@@ -42,11 +42,11 @@
if (swf && swf.parentNode) {
swf.parentNode.removeChild(swf);
}
}
-var ecc = (function (window) {
+var evercookie = (function (window) {
var document = window.document,
Image = window.Image,
localStorage = window.localStorage,
globalStorage = window.globalStorage,
swfobject = window.swfobject;
@@ -60,45 +60,45 @@
_baseKeyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
no_color = -1;
this._ec = {};
this.get = function (name, cb, dont_reset) {
- self._ecc(name, cb, undefined, undefined, dont_reset);
+ self._evercookie(name, cb, undefined, undefined, dont_reset);
};
this.set = function (name, value) {
- self._ecc(name, function () {}, value);
+ self._evercookie(name, function () {}, value);
};
- this._ecc = function (name, cb, value, i, dont_reset) {
- if (self._ecc === undefined) {
+ this._evercookie = function (name, cb, value, i, dont_reset) {
+ if (self._evercookie === undefined) {
self = this;
}
if (i === undefined) {
i = 0;
}
// first run
if (i === 0) {
- self.ecc_database_storage(name, value);
- self.ecc_png(name, value);
- self.ecc_etag(name, value);
- self.ecc_cache(name, value);
- self.ecc_lso(name, value);
+ self.evercookie_database_storage(name, value);
+ self.evercookie_png(name, value);
+ self.evercookie_etag(name, value);
+ self.evercookie_cache(name, value);
+ self.evercookie_lso(name, value);
- self._ec.userData = self.ecc_userdata(name, value);
- self._ec.cookieData = self.ecc_cookie(name, value);
- self._ec.localData = self.ecc_local_storage(name, value);
- self._ec.globalData = self.ecc_global_storage(name, value);
- self._ec.sessionData = self.ecc_session_storage(name, value);
- self._ec.windowData = self.ecc_window(name, value);
+ self._ec.userData = self.evercookie_userdata(name, value);
+ self._ec.cookieData = self.evercookie_cookie(name, value);
+ self._ec.localData = self.evercookie_local_storage(name, value);
+ self._ec.globalData = self.evercookie_global_storage(name, value);
+ self._ec.sessionData = self.evercookie_session_storage(name, value);
+ self._ec.windowData = self.evercookie_window(name, value);
}
// when writing data, we need to make sure lso object is there
if (value !== undefined) {
if ((typeof _global_lso === "undefined") && i++ < _ec_tests) {
setTimeout(function () {
- self._ecc(name, cb, value, i, dont_reset);
+ self._evercookie(name, cb, value, i, dont_reset);
}, 100);
}
}
// when reading data, we need to wait for swf, db and png
@@ -115,11 +115,11 @@
) &&
i++ < _ec_tests
)
{
setTimeout(function () {
- self._ecc(name, cb, value, i, dont_reset);
+ self._evercookie(name, cb, value, i, dont_reset);
}, 300);
}
// we hit our max wait time or got all our data
else
@@ -148,36 +148,36 @@
candidate = item;
}
}
// reset cookie everywhere
- if (dont_reset === undefined || dont_reset !== 1) {
+ if ((dont_reset === undefined || dont_reset !== 1) && candidate !== undefined) {
self.set(name, candidate);
}
if (typeof cb === "function") {
cb(candidate, tmpec);
}
self.ajax({
- url: "/ecc/save?name=" + name,
+ url: "/evercookie/save?name=" + name,
success: function (data) { }
});
}
}
};
- this.ecc_window = function (name, value) {
+ this.evercookie_window = function (name, value) {
try {
if (value !== undefined) {
window.name = _ec_replace(window.name, name, value);
} else {
return this.getFromStr(name, window.name);
}
} catch (e) { }
};
- this.ecc_userdata = function (name, value) {
+ this.evercookie_userdata = function (name, value) {
try {
var elm = this.createElem("div", "userdata_el", 1);
elm.style.behavior = "url(#default#userData)";
if (value !== undefined) {
@@ -231,61 +231,61 @@
transport.setRequestHeader(name, headers[name]);
}
transport.send();
};
- this.ecc_cache = function (name, value) {
+ this.evercookie_cache = function (name, value) {
if (value !== undefined) {
- // make sure we have ecc session defined first
- document.cookie = "ecc_cache=" + value + "; path=/ecc/";
- // /ecc/ec_cache handles caching
- newImage("/ecc/ec_cache?name=" + name);
+ // make sure we have evercookie session defined first
+ document.cookie = "evercookie_cache=" + value + "; path=/evercookie/";
+ // /evercookie/ec_cache handles caching
+ newImage("/evercookie/ec_cache?name=" + name);
} else {
// interestingly enough, we want to erase our evercookie
// http cookie so will force a cached response
- var origvalue = this.getFromStr("ecc_cache", document.cookie);
+ var origvalue = this.getFromStr("evercookie_cache", document.cookie);
self._ec.cacheData = undefined;
- document.cookie = "ecc_cache=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/ecc/";
+ document.cookie = "evercookie_cache=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/evercookie/";
self.ajax({
- url: "/ecc/ec_cache?name=" + name,
+ url: "/evercookie/ec_cache?name=" + name,
success: function (data) {
// put our cookie back
- document.cookie = "ecc_cache=" + origvalue + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/ecc/";
+ document.cookie = "evercookie_cache=" + origvalue + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/evercookie/";
self._ec.cacheData = data;
}
});
}
};
- this.ecc_etag = function (name, value) {
+ this.evercookie_etag = function (name, value) {
if (value !== undefined) {
- // make sure we have ecc session defined first
- document.cookie = "ecc_etag=" + value + "; path=/ecc/";
- // /ecc/ec_etag handles etagging
- newImage("/ecc/ec_etag?name=" + name);
+ // make sure we have evercookie session defined first
+ document.cookie = "evercookie_etag=" + value + "; path=/evercookie/";
+ // /evercookie/ec_etag handles etagging
+ newImage("/evercookie/ec_etag?name=" + name);
} else {
- // interestingly enough, we want to erase our ecc
+ // interestingly enough, we want to erase our evercookie
// http cookie so will force a cached response
- var origvalue = this.getFromStr("ecc_etag", document.cookie);
+ var origvalue = this.getFromStr("evercookie_etag", document.cookie);
self._ec.etagData = undefined;
- document.cookie = "ecc_etag=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/ecc/";
+ document.cookie = "evercookie_etag=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/evercookie/";
self.ajax({
- url: "/ecc/ec_etag?name=" + name,
+ url: "/evercookie/ec_etag?name=" + name,
success: function (data) {
// put our cookie back
- document.cookie = "ecc_etag=" + origvalue + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/ecc/";
+ document.cookie = "evercookie_etag=" + origvalue + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/evercookie/";
self._ec.etagData = data;
}
});
}
};
- this.ecc_lso = function (name, value) {
+ this.evercookie_lso = function (name, value) {
var div = document.getElementById("swfcontainer"),
flashvars = {},
params = {},
attributes = {};
if (div===null || div === undefined || !div.length) {
@@ -301,38 +301,38 @@
attributes.id = "myswf";
attributes.name = "myswf";
swfobject.embedSWF("/assets/ec.swf", "swfcontainer", "1", "1", "9.0.0", false, flashvars, params, attributes);
};
- this.ecc_png = function (name, value) {
+ this.evercookie_png = function (name, value) {
var canvas = document.createElement("canvas"),
img, ctx, origvalue;
canvas.style.visibility = "hidden";
canvas.style.position = "absolute";
canvas.width = 200;
canvas.height = 1;
if (canvas && canvas.getContext) {
- // /ecc/ec_png handles the hard part of generating the image
+ // /evercookie/ec_png handles the hard part of generating the image
// based off of the http cookie and returning it cached
img = new Image();
img.style.visibility = "hidden";
img.style.position = "absolute";
if (value !== undefined) {
- // make sure we have ecc session defined first
- document.cookie = "ecc_png=" + value + "; path=/ecc/";
+ // make sure we have evercookie session defined first
+ document.cookie = "evercookie_png=" + value + "; path=/evercookie/";
} else {
self._ec.pngData = undefined;
ctx = canvas.getContext("2d");
- // interestingly enough, we want to erase our ecc
+ // interestingly enough, we want to erase our evercookie
// http cookie so will force a cached response
- origvalue = this.getFromStr("ecc_png", document.cookie);
- document.cookie = "ecc_png=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/ecc/";
+ origvalue = this.getFromStr("evercookie_png", document.cookie);
+ document.cookie = "evercookie_png=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/evercookie/";
img.onload = function () {
// put our cookie back
- document.cookie = "ecc_png=" + origvalue + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/ecc/";
+ document.cookie = "evercookie_png=" + origvalue + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/evercookie/";
self._ec.pngData = "";
ctx.drawImage(img, 0, 0);
// get CanvasPixelArray from given coordinates and dimensions
@@ -354,15 +354,15 @@
}
self._ec.pngData += String.fromCharCode(pix[i + 2]);
}
};
}
- img.src = "/ecc/ec_png?name=" + name;
+ img.src = "/evercookie/ec_png?name=" + name;
}
};
- this.ecc_local_storage = function (name, value) {
+ this.evercookie_local_storage = function (name, value) {
try {
if (localStorage) {
if (value !== undefined) {
localStorage.setItem(name, value);
} else {
@@ -370,14 +370,14 @@
}
}
} catch (e) { }
};
- this.ecc_database_storage = function (name, value) {
+ this.evercookie_database_storage = function (name, value) {
try {
if (window.openDatabase) {
- var database = window.openDatabase("sqlite_ecc", "", "ecc", 1024 * 1024);
+ var database = window.openDatabase("sqlite_evercookie", "", "evercookie", 1024 * 1024);
if (value !== undefined) {
database.transaction(function (tx) {
tx.executeSql("CREATE TABLE IF NOT EXISTS cache(" +
"id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, " +
@@ -403,11 +403,11 @@
}
}
} catch (e) { }
};
- this.ecc_session_storage = function (name, value) {
+ this.evercookie_session_storage = function (name, value) {
try {
if (sessionStorage) {
if (value !== undefined) {
sessionStorage.setItem(name, value);
} else {
@@ -415,11 +415,11 @@
}
}
} catch (e) { }
};
- this.ecc_global_storage = function (name, value) {
+ this.evercookie_global_storage = function (name, value) {
if (globalStorage) {
var host = this.getHost();
try {
if (value !== undefined) {
globalStorage[host][name] = value;
@@ -580,15 +580,15 @@
waitForSwf(i);
}, 300);
}
};
- this.ecc_cookie = function (name, value) {
+ this.evercookie_cookie = function (name, value) {
if (value !== undefined) {
// expire the cookie first
- document.cookie = name + "=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/ecc/";
- document.cookie = name + "=" + value + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/ecc/";
+ document.cookie = name + "=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/evercookie/";
+ document.cookie = name + "=" + value + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/evercookie/";
} else {
return this.getFromStr(name, document.cookie);
}
};
@@ -703,7 +703,7 @@
};
};
return this._class;
}(window));
-; FI"dependency_digest; F"%1b21c86af1a03f131a905e45d2d90cf7I"required_paths; F[I"b/home/daddy/www/evercookie/evercookie_gem/app/assets/javascripts/evercookie/evercookie.js.erb; FI"dependency_paths; F[{I" path; FI"b/home/daddy/www/evercookie/evercookie_gem/app/assets/javascripts/evercookie/evercookie.js.erb; FI"
-mtime; FI"2012-09-11T14:52:19+03:00; FI"digest; F"%242dcdfdaf6534d7704f651053a4a185I"
_version; F"%9f3b95dd7ea3030dc35985c0a8020862
+; FI"dependency_digest; F"%27a80107f99cf809a383cf3b1b026bf9I"required_paths; F[I"b/home/daddy/www/evercookie/evercookie_gem/app/assets/javascripts/evercookie/evercookie.js.erb; FI"dependency_paths; F[{I" path; FI"b/home/daddy/www/evercookie/evercookie_gem/app/assets/javascripts/evercookie/evercookie.js.erb; FI"
+mtime; FI"2012-09-12T14:53:11+03:00; FI"digest; F"%5d37538aac0ecbf2a4c1178c5bfb199fI"
_version; F"%9f3b95dd7ea3030dc35985c0a8020862
\ No newline at end of file