Re:jSpy: Automatically detect user's history
by ttty on Saturday June 07, 2014 @10:47PM
(#7863825)
If you want to check the source code write in your console:
then click the button and step in. Here is a part of the source, hope the author doesn't mind about this:
[ Parent
| on HN ]
Suggestions:
- use if else;
- replace "if(stop){return}" with "cancelAnimationFrame";
- don't save data in the html nodes, DOM is slow, use js object to store data (timespans[currentUrl].textContent = d;).
- no need to use "window.links = ..." you can simply "links = ..."
Re:jSpy: Automatically detect user's history
by milankragujevic on Saturday June 07, 2014 @11:12PM
(#7863865)
Thanks for the suggestions, I implemented them, and also un-obfuscated and formatted the code. Also, now it's much faster since it doesn't use DOM.
Re:jSpy: Automatically detect user's history
by paulnechifor on Sunday June 08, 2014 @12:43AM
(#7863996)
I see you always omit the semicolon for the last statement in a block. Is this a Pascal influence?
Re:jSpy: Automatically detect user's history
by milankragujevic on Sunday June 08, 2014 @12:53AM
(#7864009)
No, I ran the code through an optimizer and checked "remove last semicolon".