Skip to content

Instantly share code, notes, and snippets.

@AlexMcowkin
Created April 21, 2015 21:55
Show Gist options
  • Save AlexMcowkin/183e881e71a00e5cf95a to your computer and use it in GitHub Desktop.
Save AlexMcowkin/183e881e71a00e5cf95a to your computer and use it in GitHub Desktop.
JS: get sitename
// http://sitename.com
var sitename = location.protocol + '//' + location.hostname;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment