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.
src/location-origin.coffee and dist/location-origin.js are licensed under the Unlicense.
All other source code is licensed under the MIT license.
It’s never been easier to manage developer teams with varying permissions and multiple projects. Learn more about Private Packages and Organizations…
how? learn more