3 ms·
Unfortunately console.log(foo) calls foo.toString() if and only if the console is open, and there is no way to disable this in Chrome or Firefox. Edit: You can
by iudqnolq 4y ago
Unfortunately console.log(foo) calls foo.toString() if and only if the console is open, and there is no way to disable this in Chrome or Firefox.
Edit: You can redefine console.log to be a noop, but that's also detectable.
- joeframbach 4y agoTheoretically you could also write a bookmarklet that could inspect or modify globals. Or a greasemonkey script.
- iudqnolq 4y agoYou could also fork Chrome.
- quickthrower2 4y agoYou could also fuck Mailchimp
- iudqnolq 4y agoI stopped using them years ago for other reasons. We're talking about how to do research into their fuckery here, I'm not suggesting it's sane to fork a browser to make a company's crapware work.
- easrng 4y agoI can't repro, how are you getting it to call toString?
- deecewan 4y agoThis is not true, at least in Chrome. I've tried with an object with the `toString` property set, and tried with a function with an updated prototype. In both cases, Chrome just...displays the object.
- iudqnolq 4y agoI just ran the poc I posted in this sibling comment[1] on Chrome Version 111.0.5563.65. [1]: https://news.ycombinator.com/item?id=35240559 https://news.ycombinator.com/item?id=35240559