Use history.replaceState ageVerified query and remove ENABLE_VIEW_TRANSITIONS
This commit is contained in:
parent
92123a305d
commit
f57ba9ddc4
19 changed files with 91 additions and 74 deletions
|
|
@ -5,7 +5,6 @@ import DarkModeScriptInline from "./DarkModeScriptInline.astro";
|
|||
<DarkModeScriptInline />
|
||||
|
||||
<script>
|
||||
import { ENABLE_VIEW_TRANSITIONS } from "astro:env/client";
|
||||
type ColorScheme = "auto" | "dark" | "light" | undefined;
|
||||
|
||||
const colorSchemeSetup = () => {
|
||||
|
|
@ -31,9 +30,6 @@ import DarkModeScriptInline from "./DarkModeScriptInline.astro";
|
|||
button.setAttribute("aria-hidden", "false");
|
||||
});
|
||||
};
|
||||
if (ENABLE_VIEW_TRANSITIONS) {
|
||||
document.addEventListener("astro:page-load", colorSchemeSetup);
|
||||
} else {
|
||||
colorSchemeSetup();
|
||||
}
|
||||
|
||||
colorSchemeSetup();
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue