title: JS: Call a function after another without touching the original function?
body: <p>I am trying to extend a third party library on a specific page, but I don't want to change any of the third party code. I know the name of the functions the third party library calls when something happens, so if I want my own custom code to execute after that, how can I do that?</p>
  
  <p>Third Party Library has:</p>
  
  <pre><code>function eventFinished(args){
      //library stuff here
  }
  </code></pre>
  
  <p>Now if it was my own code I'd do something like this:</p>
  
  <pre><code>function eventFinished(args){
      //library stuff here
      MyCustomFunction();
  }
  </code></pre>
  
  <p>However, it's not and I don't want to overwrite stock library code. So is there anyway to do the above, but without touching the original function code? I would have a reference to the function itself, but that's it.</p>
  
  <p>EDIT: I should mention the declared function is available globally.</p>