Skip to content

Instantly share code, notes, and snippets.

@Zorono
Created June 29, 2018 11:49
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 Zorono/06f8c39eea2eca05ccbc3a77f15f20f6 to your computer and use it in GitHub Desktop.
Save Zorono/06f8c39eea2eca05ccbc3a77f15f20f6 to your computer and use it in GitHub Desktop.
var $_GET = {};
if(document.location.toString().indexOf('?') !== -1)
{
var query = document.location.toString() .replace(/^.*?\?/, '').replace(/#.*$/, '').split('&');
for(var i=0, l=query.length; i<l; i++)
{
var aux = decodeURIComponent(query[i]).split('=');
$_GET[aux[0]] = aux[1];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment