aboutsummaryrefslogtreecommitdiff
path: root/webAO/packets/handlers/handlePV.ts
diff options
context:
space:
mode:
authorOsmium Sorcerer <os@sof.beauty>2026-06-06 02:27:32 +0000
committerOsmium Sorcerer <os@sof.beauty>2026-06-06 03:09:27 +0000
commit8bf3cae6ac89de9569a7ec629594954804a2b55a (patch)
treed897073049c414e15dd33c0ad1dac4345801b22e /webAO/packets/handlers/handlePV.ts
parente0ce108e0806d18353ad85125b2b5f1b1c67e07d (diff)
CSP hardening: remove inline styles
Similar to removal of inline scripts, everything was taken out into the CSS files, with the same styles applied there directly. This lets us use `script-src 'self'` in the CSP. Additionally, serve Golden Layout CSS locally to avoid third-party connection.
Diffstat (limited to 'webAO/packets/handlers/handlePV.ts')
-rw-r--r--webAO/packets/handlers/handlePV.ts5
1 files changed, 1 insertions, 4 deletions
diff --git a/webAO/packets/handlers/handlePV.ts b/webAO/packets/handlers/handlePV.ts
index 2e14ad2f..28eaf741 100644
--- a/webAO/packets/handlers/handlePV.ts
+++ b/webAO/packets/handlers/handlePV.ts
@@ -99,9 +99,6 @@ export const handlePV = async (args: string[]) => {
`${AO_HOST}characters/${encodeURI(me.name)}/custom.gif`,
)
) {
- document.getElementById("button_4")!.style.display = "";
- } else {
- document.getElementById("button_4")!.style.display = "none";
+ document.getElementById("button_4")!.classList.remove("nodisplay");
}
-
};