包详细信息

window-location-origin

kylewelsby22.3kMIT0.1.0

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

window.location.origin, window, location, origin

自述文件

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

更新日志

0.1.0

  • Port should be included #1

0.0.1

  • Initial release