Files
tps/main.ts
2023-07-08 17:50:00 +02:00

21 lines
386 B
TypeScript

type TPSSearchParams = {
display?: "pure" | "full"
}
const params = new URL(document.location.href).searchParams
const display = params.get("display")
if (display === "pure") {
document.querySelector("header")?.remove()
}
const size = params.get("size")
if (size === "small") {
const body = document.querySelector("body")
if (body) {
body.style.fontSize = "15px"
}
}