Inject javascript code into anonymous function scope
问题 I've got this kind of script I need to inject into ! function(e) { function doSomething() { } } Basically I get a reference to doSomething, when my code is called via Function object, but I need to hook to doSomething, so I need an original reference to id. Since doSomething is declared inside anonymous function I can't get to it. Question is, can I somehow inject code into the scope of anonymous function, Greesemonkey or any other tool. 回答1: Javascript doesn't make it easy to get values from