@robocoder opened this Issue on August 8th 2015 Contributor

I'm AFK so I can't test this and submit a PR, but overall is fairly trivial...

The now variable here isn't being used in logPageView(), so it can be removed:

now = new Date(),

I suggest getting rid of this workaround:

Date.prototype.getTimeAlias = Date.prototype.getTime;

and change the many occurrences of something = new Date() ... something.getTime() to +new Date (the '+' casts the object to an integer, thus yielding the time in milliseconds).

It's been 4 years, I recommend removing the JSON polyfill as native browser support has improved (and this line means it can no longer polyfill broken JSON implementations):

JSON2 = window.JSON || {};

Wrap utf8_encode and sha1 into a polyfill for crypto.subtle.digest.

@mattab commented on September 19th 2015 Owner

Thanks for suggestions @robocoder. I think @dhoko also suggested some of these before. pull request(s) are most welcome :-)

Powered by GitHub Issue Mirror