Skip to content

Instantly share code, notes, and snippets.

@lgraubner
Created July 3, 2017 08:25
Show Gist options
  • Save lgraubner/57af272c0eb94a945724b0a79bab1473 to your computer and use it in GitHub Desktop.
Save lgraubner/57af272c0eb94a945724b0a79bab1473 to your computer and use it in GitHub Desktop.
Gets key value pairs from query string
document.location.search.slice(1).split('&').reduce(function(o,n){n=n.split('=');o[n[0]]=n[1];return o},{})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment