mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-12 18:56:01 +00:00
Initial commit
This commit is contained in:
11
assets/js/hooks/Mapper/utils/getQueryVariable.ts
Normal file
11
assets/js/hooks/Mapper/utils/getQueryVariable.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export const getQueryVariable = (variable: string) => {
|
||||
const query = window.location.search.substring(1);
|
||||
const vars = query.split('&');
|
||||
for (let i = 0; i < vars.length; i++) {
|
||||
const pair = vars[i].split('=');
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Reference in New Issue
Block a user