Skip to content

Instantly share code, notes, and snippets.

@user24
Created October 2, 2020 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save user24/9206da054e3a155a93425216dbee2586 to your computer and use it in GitHub Desktop.
Save user24/9206da054e3a155a93425216dbee2586 to your computer and use it in GitHub Desktop.
function getURLParam(param) {
if (window.location.search.indexOf(param + '=') === -1) {
return undefined;
}
return window.location.search.split(param + '=')[1].split(/&|#/)[0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment