pushState

This commit is contained in:
Marc Beninca 2023-06-30 18:53:17 +02:00
parent 5d4dcf42eb
commit b804078f3c

View file

@ -55,7 +55,8 @@
<script>
function update(id) {
console.log(id)
let tabs = id.split('/').slice(1)
window.history.pushState(null, null, `?tab=${tabs.join('/')}`)
}
function main() {
let tab = (new URL(document.location)).searchParams.get('tab')