EyeTrackVR-Docs/docs/_includes/header_custom.html

18 lines
604 B
HTML

<ul>
<a href="javascript:toggleDetect()" title="Switching Schemes" class="btn btn-mode fs-2 mb-1 mb-md-0 mr-0"
id="switch-mode">Dark Mode</a>
</ul>
<script type="text/javascript">
const switch_scheme = document.getElementById("switch-mode");
var isClicked = false;
async function toggleDetect() {
if (isClicked == false) {
isClicked = true;
switch_scheme.textContent = "Light Mode";
} else {
isClicked = false;
switch_scheme.textContent = "Dark Mode";
}
await switchScheme(isClicked);
}
</script>