Polyfill for window.location.origin
// On http://yourhost:5000/path/to/page
window.location.origin; //=> "http://yourhost:5000"
bower i --save location-origin
component install shinnn/location-origin.js
npm i --save location-origin
Download the script file directly.
I used the blog post by Toby Osbourn as reference. Thanks, tosbourn.
src/location-origin.coffee and dist/location-origin.js are licensed under the Unlicense.
All other source code is licensed under the MIT license.
Version | Tag | Published |
---|---|---|
1.1.4 | latest | 9yrs ago |