Skip to content

Instantly share code, notes, and snippets.

View johnvicencio's full-sized avatar

John Vicencio johnvicencio

View GitHub Profile
@johnvicencio
johnvicencio / javascript
Last active August 18, 2020 21:49
Notebook
Query String
//get's a query parameter by name from current url
function getUrlParameter(name) {
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
var results = regex.exec(location.search);
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
};

Keybase proof

I hereby claim:

  • I am johnvicencio on github.
  • I am johnvicencio (https://keybase.io/johnvicencio) on keybase.
  • I have a public key whose fingerprint is FF74 803D E5B2 1798 5419 DC9B 4E84 E546 722F 4429

To claim this, I am signing this object: