Skip to content

Instantly share code, notes, and snippets.

@lancebecker
Created April 4, 2016 18:53
Show Gist options
  • Save lancebecker/55734c211c0b183dfba809eb5802cfd1 to your computer and use it in GitHub Desktop.
Save lancebecker/55734c211c0b183dfba809eb5802cfd1 to your computer and use it in GitHub Desktop.
function getQueryParam( param ) {
let loc = document.location.search
if ( document.location.search && param ) {
return document.location.search.split( param + '=' ).pop()
}
}
getQueryParam( 'key' )
@bradgreens
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment