15 lines
357 B
TypeScript
15 lines
357 B
TypeScript
const getConnectionBase = (loc: any): string => {
|
|
if (!loc.host.match(/.*battle-linux.*/)
|
|
// && !loc.host.match(/.*backstory-beta.*/)
|
|
) {
|
|
return loc.protocol + "//" + loc.host;
|
|
} else {
|
|
return loc.protocol + "//battle-linux.ketrenos.com:8912";
|
|
}
|
|
}
|
|
|
|
const connectionBase = getConnectionBase(window.location);
|
|
|
|
export {
|
|
connectionBase
|
|
}; |