1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-17 04:01:51 +00:00
tobspr_shapez.io/src/js/core/query_parameters.js

23 lines
566 B
JavaScript
Raw Normal View History

2020-05-09 14:45:23 +00:00
const queryString = require("query-string");
const options = queryString.parse(location.search);
export let queryParamOptions = {
embedProvider: null,
2020-06-13 09:01:43 +00:00
fullVersion: false,
2020-06-28 10:38:48 +00:00
sandboxMode: false,
2020-05-09 14:45:23 +00:00
};
if (options.embed) {
queryParamOptions.embedProvider = options.embed;
}
2020-06-13 09:01:43 +00:00
// Allow testing full version outside of standalone
2020-06-13 09:06:15 +00:00
if (options.fullVersion && !G_IS_RELEASE) {
2020-06-13 09:01:43 +00:00
queryParamOptions.fullVersion = true;
}
2020-06-28 10:38:48 +00:00
// Allow testing full version outside of standalone
if (options.sandboxMode && !G_IS_RELEASE) {
queryParamOptions.sandboxMode = true;
}