diff options
| author | stonedDiscord <stonedDiscord@users.noreply.github.com> | 2024-11-20 13:31:50 +0000 |
|---|---|---|
| committer | GitHub Action <actions@github.com> | 2024-11-20 13:31:50 +0000 |
| commit | 6684f3fce6e90fd0574d7bab63b629554ab03ef6 (patch) | |
| tree | b2a62247d17e23a77af57aea355ba621666817c2 /webAO/client/aoHost.ts | |
| parent | 95a2d1361d84c61b454ebe506e6963b93f6d8dee (diff) | |
Prettified Code!
Diffstat (limited to 'webAO/client/aoHost.ts')
| -rw-r--r-- | webAO/client/aoHost.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/webAO/client/aoHost.ts b/webAO/client/aoHost.ts index 33e010d..906d4a6 100644 --- a/webAO/client/aoHost.ts +++ b/webAO/client/aoHost.ts @@ -1,16 +1,16 @@ -import queryParser from '../utils/queryParser' +import queryParser from "../utils/queryParser"; const { asset } = queryParser(); export let AO_HOST = asset; export const setAOhost = (val: string) => { - const currentProtocol = window.location.protocol; - const assetProtocol = val.split(':')[0] + ':'; + const currentProtocol = window.location.protocol; + const assetProtocol = val.split(":")[0] + ":"; - if (currentProtocol === 'https:' && assetProtocol === 'http:') { - // In this specific case, we need to request assets over HTTPS - console.log('Upgrading asset link to https'); - val = val.replace('http:', 'https:'); - } + if (currentProtocol === "https:" && assetProtocol === "http:") { + // In this specific case, we need to request assets over HTTPS + console.log("Upgrading asset link to https"); + val = val.replace("http:", "https:"); + } - AO_HOST = val; -} + AO_HOST = val; +}; |
