Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Only eat "www." when it's the first part of a hostname #83

Merged
merged 1 commit into from

2 participants

@johan

No description provided.

@defunkt defunkt merged commit 18b9a30 into defunkt:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 7, 2012
  1. @johan
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.hostname.replace('www.','')+'.js',
+ url: 'http://localhost:3131/'+location.hostname.replace(/^www\./,'')+'.js',
dataType: 'text',
success: function(d){
$(function(){ eval(d) })
Something went wrong with that request. Please try again.