title: Get Url For Currently Executing Javascript
body: <p>I'm trying to find the url for the currently executing javascript. I know I can use <code>window.location.href</code> for the current page, but that's not necessarily the path to the script which is executing.</p>
  
  <p>Any help is greatly appreciated.</p>
  
  <p>Thanks.</p>
  
  <p><strong>EDIT 1:</strong> I'm fully open to the use of plugins and such to accomplish this. Don't hesitate to suggest anything.</p>
  
  <p><strong>EDIT 2:</strong> I need this so that I can find a relative path from where my currently executing script is at to another resource. The issue is that, for example, the script is running at /js/myScript.js and the resource I need to reference is at /imgs/test.png. Since the .js file can be included from anywhere, the path to the .png file cannot be known.</p>