-
-
Save brenopolanski/7ddc9a986f548ae8e001 to your computer and use it in GitHub Desktop.
Based on http://tosbourn.com/2013/08/javascript/a-fix-for-window-location-origin-in-internet-explorer/
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
var origin = function () { | |
// IE10 Doesn't have window.location.origin :( | |
if (!window.location.origin) { | |
var port = window.location.port ? ':' + window.location.port : ''; | |
return window.location.protocol + "//" + window.location.hostname + port; | |
} else { | |
return window.location.origin; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment