This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pretend that cookies work | |
(function (document) { | |
var cookies = {}; | |
document.__defineGetter__('cookie', function () { | |
var output = []; | |
for (var cookieName in cookies) { | |
output.push(cookieName + "=" + cookies[cookieName]); | |
} | |
return output.join(";"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function profilify(fn, label) { | |
var displayName = label || fn.name, | |
called = 0, | |
profilified = function() { | |
var args = [].slice.call(arguments), | |
startedAt = new Date(), | |
defaults = { total: 0, times: 0, average: 0 }, | |
ret; | |
profilify._stats[displayName] = profilify._stats[displayName] || defaults |
NewerOlder