Skip to content

Instantly share code, notes, and snippets.

@toddmotto
Created January 10, 2014 12:04
Show Gist options
  • Save toddmotto/8350837 to your computer and use it in GitHub Desktop.
Save toddmotto/8350837 to your computer and use it in GitHub Desktop.
Conditionizr test for localhost, add optional port number: /(?:127.0.0.1|localhost):9000/
conditionizr.add('localhost', [], function () {
return /(?:127.0.0.1|localhost)/.test(location.host);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment