modern/js/getUrlParams.js
2021-01-17 17:17:19 +01:00

22 lines
483 B
JavaScript
Executable File

window.onload = function () {
"use strict";
if (!window.location.href.includes("?scene="))
window.location.href = window.location.href = "?scene=modern";
};
export default function () {
"use strict";
var params = {};
var param_array;
try {
param_array = window.location.href.split("?")[1].split("&");
} catch (e) {
console.error(e);
}
for (var i in param_array) {
let x = param_array[i].split("=");
params[x[0]] = x[1];
}
return params;
};