|
@@ -144,11 +144,17 @@
|
|
|
}
|
|
|
showcoffee();
|
|
|
|
|
|
+ function getParameterByName(name, url = window.location.href) {
|
|
|
+ name = name.replace(/[\[\]]/g, '\\$&');
|
|
|
+ var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
|
|
|
+ results = regex.exec(url);
|
|
|
+ if (!results) return null;
|
|
|
+ if (!results[2]) return '';
|
|
|
+ return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
|
|
+ }
|
|
|
function getUserid() {
|
|
|
- const urlParams = new URLSearchParams(document.location.href);
|
|
|
- let id = urlParams.get('userid');
|
|
|
+ let id = getParameterByName('userid');
|
|
|
$('#userid').val(id);
|
|
|
- // console.log();
|
|
|
}
|
|
|
getUserid();
|
|
|
|