Skip to content

Instantly share code, notes, and snippets.

@jswhisperer
Created July 8, 2013 19:09
Show Gist options
  • Select an option

  • Save jswhisperer/5951576 to your computer and use it in GitHub Desktop.

Select an option

Save jswhisperer/5951576 to your computer and use it in GitHub Desktop.
the current url
// Retrieve current URL
var url = document.URL;
// Retrieve current root URL
var root = location.protocol + '//' + location.host;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment