Add support for browsers that don't natively support window.location.origin
JavaScript
Switch branches/tags
Nothing to show
Latest commit 6701ddb Dec 12, 2016 @kylewelsby Bump Version 0.1.0
Port Support Thanks to @jimmywarting
Permalink
Failed to load latest commit information.
src
test
.gitignore 💫 add testem Sep 10, 2013
.travis.yml
CHANGELOG.md Bump Version 0.1.0 Dec 12, 2016
LICENSE Initial commit Sep 10, 2013
README.md
bower.json Bump Version 0.1.0 Dec 12, 2016
package.json
testem.json Added tests Sep 10, 2013

README.md

Travis npm Bower Libraries.io for GitHub license

window-location-origin.js

Add support for browsers that don't natively support window.location.origin

Example

window.location.origin
// #=> https://github.com

Install

Bower
bower install window-location-origin

Include the script into your site

<script src="bower_components/window-location-origin.js"></script>
NPM
npm install window-location-origin

Require the script into your project

require 'window-location-origin'

Stackoverflow discussion: JavaScript/jQuery method to find base URL from a string