Created
July 4, 2019 17:39
-
-
Save gurkanakdeniz/b844b364587a8da5c9c87855cf153522 to your computer and use it in GitHub Desktop.
safe window location javascript
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 currentPath() { | |
var response = | |
window.location.protocol + | |
"//" + | |
window.location.hostname + | |
(window.location.port ? ":" + window.location.port : ""); | |
return response; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment