function getQueryString = (name) => { let reg = new RegExp("(^|/?|&)" + name + "=([^&]*)(&|$)", "i"); let r = decodeURIComponent(location.href).substr(1).match(reg); if (r != null) return r[2]; return null; };