location-origin

1.1.4 • Public • Published

location-origin.js

Bower version NPM version Build Status devDependency Status

browser support

Polyfill for window.location.origin

// On http://yourhost:5000/path/to/page
 
window.location.origin; //=> "http://yourhost:5000"

Installation

Install with package manager

Bower

bower i --save location-origin

Component

component install shinnn/location-origin.js

npm (Use with Browserify etc.)

npm i --save location-origin

Standalone

Download the script file directly.

Acknowledgements

I used the blog post by Toby Osbourn as reference. Thanks, tosbourn.

License

src/location-origin.coffee and dist/location-origin.js are licensed under the Unlicense.

All other source code is licensed under the MIT license.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.4
    4,489
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.4
    4,489
  • 1.1.3
    0
  • 1.1.2
    2
  • 1.1.1
    1

Package Sidebar

Install

npm i location-origin

Weekly Downloads

1,875

Version

1.1.4

License

none

Last publish

Collaborators

  • shinnn