I am sending an email that links a user to a URL with a query string. I am retrieving this string with:
var getQueryString = function ( field, url ) {
var href = url ? url : window.location.href;
var reg = new RegExp( '[?&]' + field + '=([^&#]*)', 'i' );
var string = reg.exec(href);
return string ? string[1] : null;
};
var list = getQueryString('list', window.location.href);
console.log(list);
I want to pass this query string to another link on this page. My current function reads as:
function signin(){
  var email = document.getElementById('email').value;
  var password = document.getElementById('password').value;
  firebase.auth().signInWithEmailAndPassword(email, password).then(function(){
    window.location.replace("management.html" + list);
  })
  .catch(function(error) {
    ...
  });
}
How can I correctly pass the variable list to signin?
 
     
    