aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-07 20:25:15 +0800
committerFabio Berger <me@fabioberger.com>2018-03-07 20:25:15 +0800
commit6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d (patch)
tree7d9030c062e22043cd49f27527c9d4537e41e618 /packages/website/ts/utils
parent327cc307b35bf4a38c86f87c45718fd456025035 (diff)
downloaddexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.tar
dexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.tar.gz
dexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.tar.bz2
dexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.tar.lz
dexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.tar.xz
dexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.tar.zst
dexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.zip
Add onSelectedVersion callback so it can be handled in any way the caller wishes
Diffstat (limited to 'packages/website/ts/utils')
-rw-r--r--packages/website/ts/utils/utils.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index d35f77e94..308b4bb5c 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -270,4 +270,10 @@ export const utils = {
window.onload = () => resolve();
});
},
+ getCurrentBaseUrl() {
+ const port = window.location.port;
+ const hasPort = !_.isUndefined(port);
+ const baseUrl = `https://${window.location.hostname}${hasPort ? `:${port}` : ''}`;
+ return baseUrl;
+ },
};