const http = window.location.href; function getUrlParam(url, name) { let pattern = new RegExp("[?&]" + name + "\=([^&]+)", "g"); let matcher = pattern.exec(url); let items = null; if (matcher != null) { try { items = decodeURIComponent(decodeURIComponent(matcher[1])); } catch (e) { try { items = decodeURIComponent(matcher[1]); } catch (e) { items = matcher[1]; } } } return items; }