You can investigate script collection at:
var scripts = document.getElementsByTagName("script");
For each element in the returned
scripts array you can access its
The currently executing include file will always be the last one in the
scripts array. So you can access it at
Of course this will only work at time of initial code run and would not be useful for example within a function that is called after initial script is loaded, so if you need the value available later, you would need to save it to a variable.