title: Is there anyway to intercept javascript calls made by a web application
body: <p>Is there anyway to inject JavaScript so that I can tell every time JavaScript is executed in the web page?</p>
  <p>For instance suppose a button triggers some function <code>foo(&quot;bar&quot;) ...</code> I would like to inject JavaScript such that when a user clicks the button another function is called first and passed the function name &quot;foo&quot; and arguments &quot;bar&quot;.</p>
  <p>The reason I want to do this is that I'm trying to mirror one users actions to another remote user -- so that as one user clicks I could intercept the JavaScript function send it over via node.js to the other user and execute the same function on the second users side programatically.</p>