function urlToJson(){ var ret = {}; window.location.search.substr(1).replace(/(w+)=(w+)/ig, function(a, b, c){ret[b] = unescape(c);}); return ret;};