diff options
| author | Caleb <caleb.mabry.15@cnu.edu> | 2022-09-04 20:22:35 -0400 |
|---|---|---|
| committer | Caleb <caleb.mabry.15@cnu.edu> | 2022-09-04 20:22:35 -0400 |
| commit | ce708f69ed7878422a6a6371e44faed6857cb79a (patch) | |
| tree | 7a0b259736e9619c225506549cf5ae36bcda7172 /webAO | |
| parent | 1e3fde25b9f6d8adbdf087a51a34dc35cc1907d8 (diff) | |
Fix AO Host
Diffstat (limited to 'webAO')
| -rw-r--r-- | webAO/client.ts | 5 | ||||
| -rw-r--r-- | webAO/client/aoHost.ts (renamed from webAO/client/aoHost.js) | 6 | ||||
| -rw-r--r-- | webAO/components/blip.js | 2 | ||||
| -rw-r--r-- | webAO/dom/resetOffset.ts | 9 | ||||
| -rw-r--r-- | webAO/packets/handlers/handleASS.ts | 2 | ||||
| -rw-r--r-- | webAO/packets/handlers/handleBN.ts | 4 | ||||
| -rw-r--r-- | webAO/packets/handlers/handleEI.ts | 3 | ||||
| -rw-r--r-- | webAO/packets/handlers/handleLE.ts | 3 | ||||
| -rw-r--r-- | webAO/packets/handlers/handleMC.ts | 3 | ||||
| -rw-r--r-- | webAO/packets/handlers/handlePV.ts | 3 | ||||
| -rw-r--r-- | webAO/packets/handlers/handleZZ.ts | 3 | ||||
| -rw-r--r-- | webAO/viewport.ts | 2 |
12 files changed, 26 insertions, 19 deletions
diff --git a/webAO/client.ts b/webAO/client.ts index 33f1802..5d5eb2c 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -37,10 +37,7 @@ let { ip: serverIP, mode, asset, theme } = queryParser(); const DEFAULT_HOST = "http://attorneyoffline.de/base/"; import { showname_click } from './dom/showNameClick' import { updateActionCommands } from './dom/updateActionCommands' -export let AO_HOST = asset || DEFAULT_HOST; -export const setAOhost = (val: string) => { - AO_HOST = val -} +import { AO_HOST } from './client/aoHost' let THEME: string = theme || "default"; let CHATBOX: string; diff --git a/webAO/client/aoHost.js b/webAO/client/aoHost.ts index b387608..9b0a768 100644 --- a/webAO/client/aoHost.js +++ b/webAO/client/aoHost.ts @@ -1,5 +1,7 @@ import queryParser from '../utils/queryParser' let { asset } = queryParser(); const DEFAULT_HOST = 'http://attorneyoffline.de/base/'; -const AO_HOST = asset || DEFAULT_HOST -export default AO_HOST +export let AO_HOST = asset || DEFAULT_HOST +export const setAOhost = (val: string) => { + AO_HOST = val +} diff --git a/webAO/components/blip.js b/webAO/components/blip.js index eacbeaf..db6a784 100644 --- a/webAO/components/blip.js +++ b/webAO/components/blip.js @@ -1,4 +1,4 @@ -import AO_HOST from '../client/aoHost' +import { AO_HOST } from '../client/aoHost' /** * diff --git a/webAO/dom/resetOffset.ts b/webAO/dom/resetOffset.ts index 2cf8197..86dfd5b 100644 --- a/webAO/dom/resetOffset.ts +++ b/webAO/dom/resetOffset.ts @@ -1,5 +1,6 @@ + export function resetOffset(_event: Event) { - (<HTMLInputElement>document.getElementById("pair_offset")).value = "0"; - (<HTMLInputElement>document.getElementById("pair_y_offset")).value = "0"; - } - window.resetOffset = resetOffset;
\ No newline at end of file + (<HTMLInputElement>document.getElementById("pair_offset")).value = "0"; + (<HTMLInputElement>document.getElementById("pair_y_offset")).value = "0"; +} +window.resetOffset = resetOffset;
\ No newline at end of file diff --git a/webAO/packets/handlers/handleASS.ts b/webAO/packets/handlers/handleASS.ts index d0dfbd5..ea8a0d3 100644 --- a/webAO/packets/handlers/handleASS.ts +++ b/webAO/packets/handlers/handleASS.ts @@ -1,4 +1,4 @@ -import { setAOhost } from "../../client"; +import { setAOhost } from "../../client/aoHost"; /** diff --git a/webAO/packets/handlers/handleBN.ts b/webAO/packets/handlers/handleBN.ts index f7b8447..067130d 100644 --- a/webAO/packets/handlers/handleBN.ts +++ b/webAO/packets/handlers/handleBN.ts @@ -1,7 +1,9 @@ -import { AO_HOST, client, getIndexFromSelect, updateBackgroundPreview } from "../../client"; +import { client, getIndexFromSelect, updateBackgroundPreview } from "../../client"; +import { AO_HOST } from "../../client/aoHost"; import { safeTags } from "../../encoding"; import tryUrls from "../../utils/tryUrls"; + /** * Handles a background change. * @param {Array} args packet arguments diff --git a/webAO/packets/handlers/handleEI.ts b/webAO/packets/handlers/handleEI.ts index e96f0c9..c74e4d4 100644 --- a/webAO/packets/handlers/handleEI.ts +++ b/webAO/packets/handlers/handleEI.ts @@ -1,4 +1,5 @@ -import { AO_HOST, client } from '../../client' +import { client } from '../../client' +import { AO_HOST } from '../../client/aoHost'; import { prepChat, safeTags } from '../../encoding'; /** diff --git a/webAO/packets/handlers/handleLE.ts b/webAO/packets/handlers/handleLE.ts index 28f0b40..1eaeb27 100644 --- a/webAO/packets/handlers/handleLE.ts +++ b/webAO/packets/handlers/handleLE.ts @@ -1,4 +1,5 @@ -import { AO_HOST, client } from '../../client' +import { client } from '../../client' +import { AO_HOST } from '../../client/aoHost'; import { prepChat, safeTags } from '../../encoding'; /** diff --git a/webAO/packets/handlers/handleMC.ts b/webAO/packets/handlers/handleMC.ts index 28254ba..bf60eb9 100644 --- a/webAO/packets/handlers/handleMC.ts +++ b/webAO/packets/handlers/handleMC.ts @@ -1,5 +1,6 @@ import { prepChat } from "../../encoding"; -import { AO_HOST, appendICLog, client } from '../../client' +import { appendICLog, client } from '../../client' +import { AO_HOST } from "../../client/aoHost"; /** * Handles a music change to an arbitrary resource. diff --git a/webAO/packets/handlers/handlePV.ts b/webAO/packets/handlers/handlePV.ts index 5bdb702..fba2a3c 100644 --- a/webAO/packets/handlers/handlePV.ts +++ b/webAO/packets/handlers/handlePV.ts @@ -1,6 +1,7 @@ -import { AO_HOST, client, pickEmotion } from "../../client"; +import { client, pickEmotion } from "../../client"; import fileExists from "../../utils/fileExists"; import { updateActionCommands } from '../../dom/updateActionCommands' +import { AO_HOST } from "../../client/aoHost"; /** * Handles the server's assignment of a character for the player to use. diff --git a/webAO/packets/handlers/handleZZ.ts b/webAO/packets/handlers/handleZZ.ts index 1a56e49..1c1cb1d 100644 --- a/webAO/packets/handlers/handleZZ.ts +++ b/webAO/packets/handlers/handleZZ.ts @@ -1,4 +1,5 @@ -import { AO_HOST, client } from "../../client"; +import { client } from "../../client"; +import { AO_HOST } from "../../client/aoHost"; import { prepChat } from "../../encoding"; diff --git a/webAO/viewport.ts b/webAO/viewport.ts index e6b8d00..f647d86 100644 --- a/webAO/viewport.ts +++ b/webAO/viewport.ts @@ -12,7 +12,7 @@ import setEmote from "./client/setEmote"; import getAnimLength from "./utils/getAnimLength"; import { safeTags } from "./encoding"; import setCookie from "./utils/setCookie"; -import { AO_HOST } from "./client"; +import { AO_HOST } from "./client/aoHost"; interface ChatMsg { content: string; objection: number; |
