Skip to content

Instantly share code, notes, and snippets.

@sergey-tihon
Created March 27, 2012 12:06
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 sergey-tihon/2215339 to your computer and use it in GitHub Desktop.
Save sergey-tihon/2215339 to your computer and use it in GitHub Desktop.
GetUrlKeyValue
function GetUrlKeyValue(d, e, a) {
ULSA13: ;
var c = "";
if (a == null) a = window.location.href + "";
var b;
b = a.indexOf("#");
if (b >= 0) a = a.substr(0, b);
b = a.indexOf("&" + d + "=");
if (b == -1) b = a.indexOf("?" + d + "=");
if (b != -1) {
ndx2 = a.indexOf("&", b + 1);
if (ndx2 == -1) ndx2 = a.length;
c = a.substring(b + d.length + 2, ndx2)
}
if (e) return c;
else return unescapeProperlyInternal(c)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment