Skip to content

Instantly share code, notes, and snippets.

@sergey-tihon
Created Mar 27, 2012
Embed
What would you like to do?
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