Last active
April 13, 2016 11:58
-
-
Save tiberiur/35595cb21862e9b48d7a to your computer and use it in GitHub Desktop.
[JS] File path or the name of currently loaded webpage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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