aboutsummaryrefslogtreecommitdiff
path: root/webAO/dom/switchChatOffset.ts
blob: 257d1ca1cf5eaf502d83683b379ae868cf8a5c81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/**
 * Triggered by the change aspect ratio checkbox
 */
export async function switchChatOffset() {
  const container = document.getElementById("client_chatcontainer")!;
  if (
    (<HTMLInputElement>document.getElementById("client_hdviewport_offset"))
      .checked
  ) {
    container.style.width = "80%";
    container.style.left = "10%";
  } else {
    container.style.width = "100%";
    container.style.left = "0";
  }
}
window.switchChatOffset = switchChatOffset;