Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

So's one could use this with localhost #54

Merged
merged 1 commit into from

2 participants

@jaw6

Normally, these aren't that different:

location.host => 'github.com'
location.hostname => 'github.com'

But, location.host includes the port, if any:

location.host => 'localhost:3000'
location.hostname => 'localhost'

@jaw6 jaw6 So's one could use this with localhost
location.host => 'localhost:3000' :(
location.hostname => 'localhost'  :)
6506d1a
@defunkt defunkt merged commit 4edbf62 into defunkt:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 31, 2011
  1. @jaw6

    So's one could use this with localhost

    jaw6 authored
    location.host => 'localhost:3000' :(
    location.hostname => 'localhost'  :)
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  ext/dotjs.js
View
2  ext/dotjs.js
@@ -1,5 +1,5 @@
$.ajax({
- url: 'http://localhost:3131/'+window.location.host.replace('www.','')+'.js',
+ url: 'http://localhost:3131/'+window.location.hostname.replace('www.','')+'.js',
dataType: 'text',
success: function(d){
$(function(){ eval(d) })
Something went wrong with that request. Please try again.