|
@@ -37,4 +37,19 @@ function removeCookie(key) {
|
|
|
} else {
|
|
|
document.cookie = `${key}=; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+function parseURLParameter() {
|
|
|
+ const data = {};
|
|
|
+ const get = location.search.substr(1).split("&");
|
|
|
+ for (elt of get) {
|
|
|
+ const split = elt.split("=");
|
|
|
+ data[split[0]] = decodeURIComponent(split[1]);
|
|
|
+ }
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+function getURLParameter(key) {
|
|
|
+ const get = parseURLParameter();
|
|
|
+ return get[key];
|
|
|
}
|