This commit is contained in:
Marc Beninca 2023-06-30 23:21:55 +02:00
parent 860d33a922
commit 9ebdd74457

View file

@ -68,7 +68,7 @@ def main():
</head><body onload="main()"><header>
<!----------------------------------------------------------------------------->
<input type="checkbox" onclick="swap()" checked />
<input type="checkbox" id="dark" onclick="swap()" />
<h1><a href="#home">Marc Beninca</a></h1>
<!----------------------------------------------------------------------------->
@ -302,9 +302,13 @@ padding: 10px;
function check(tab) {{
const tabs = tab.split('/')
let id = 'tab'
let element
for (tab of tabs) {{
id = `${{id}}/${{tab}}`
document.getElementById(id).checked = true
element = document.getElementById(id)
if (element) {{
element.checked = true
}}
}}
}}
@ -326,6 +330,10 @@ function main() {{
check(tab)
push(tab)
}}
const dark = document.getElementById('dark')
if (dark) {{
dark.checked = true
}}
}}
function swap() {{