Skip to content

Instantly share code, notes, and snippets.


Stephan Bösch-Plepelits plepe

View GitHub Profile
plepe / __FILE__.js
Created Oct 15, 2012
__FILE__ in JavaScript
View __FILE__.js
* This gist provides a __FILE__ variable, which holds the path to the file
* from which the currently running source is being executed.
* Usage example: alert(__FILE__);
* Thanks to on which this gist
* is based on.
* Tested in Mozilla Firefox 9, Mozilla Firefox 16, Opera 12, Chromium 18
You can’t perform that action at this time.