I’m using the following javascript to get URL parameters…
function getUrlParams() {
var params = {};
window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(str,key,value) {
params[key] = value;
});
return params;
}
var params = getUrlParams();
var urlvars = (params.email);
The URL has ?email=email@domain.com&fbemail=email@domain.com
In most cases one of those values is blank, otherwise they’re the same. So I’m trying to make urlvars = (params.email) or (params.fbemail)
What’s the best way to go about this?
I’ll go ahead and make my comment an answer. Why not literally write what you said?