Skip to content

Instantly share code, notes, and snippets.

@tiberiur
Last active April 13, 2016 11:58
Show Gist options
  • Save tiberiur/35595cb21862e9b48d7a to your computer and use it in GitHub Desktop.
Save tiberiur/35595cb21862e9b48d7a to your computer and use it in GitHub Desktop.
[JS] File path or the name of currently loaded webpage
function fileName()
{
var fileName = window.location.href;
fileName = fileName.substr(fileName.lastIndexOf("/") - 1);
return fileName;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment