Ask HN: Editing functions within JavaScript closure, e.g. Agar.io

https://news.ycombinator.com/item?id=9655947
by TechSpectator • 11 years ago
1 1 11 years ago

I've seen Chrome extensions which remove the site's <script> tag and replace it with a modified version, which isn't ideal because any minor JS change can break it. I've seen using debugger tools to place a breakpoint in the closure's init script, in order to create a global variable to reference it, which works great but requires user intervention each load. And yes, I understand that the point of the closure is to limit / restrict public access. Are there other alternatives to access / modify the contents of a closure, within the context of a malicious user?

Related Stories

Loading related stories...

Source preview

news.ycombinator.com