pushState
This commit is contained in:
parent
5d4dcf42eb
commit
b804078f3c
1 changed files with 2 additions and 1 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue