Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Note: I’m the author of the article.

I know, the solution presented there isn’t perfect. But IMHO it’s as close as it gets, and it should be sufficiently advanced that detection should be complicated due to differences in browsers and extensions.



No, as close as it gets is privacy.resistFingerprinting. Extensions shouldn’t even try to do this. (I’ve actually never heard of an extension that tries to do this.)



Correct, and I’m taking those into account when saying “extensions shouldn’t even try to do this”.


> But IMHO it’s as close as it gets

How about replacing the original method (on the prototype) with a proxy to that method that intercepts apply?


wouldnt it make more sense to overwrite toString?

     original_functions[Function.prototype.toString.toString()] = originalToStringStr;


Yes, I’ve been doing this in the past elsewhere. Quite a messy affair, you have to overwrite `Function.prototype.toString` – meaning for all functions, no real way to do it for a single function. And then you have to be very careful because your overwritten functions runs in an environment you don’t control. Not sure whether implementing this in a completely tamper-proof way is possible.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: