mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 09:00:10 +00:00
add backwards navigation
This commit is contained in:
parent
ee026714d4
commit
ce98b2eb5a
@ -105,9 +105,14 @@ document.addEventListener("tab-change", (event: CustomEvent) => {
|
||||
if (lang) {
|
||||
tab += "?lang=" + lang
|
||||
}
|
||||
window.history.replaceState("", "Admin - jfa-go", tab);
|
||||
window.history.pushState(event.detail, "Admin - jfa-go", tab);
|
||||
});
|
||||
|
||||
window.onpopstate = (event: PopStateEvent) => {
|
||||
console.log(event.state);
|
||||
window.tabs.switch(event.state);
|
||||
}
|
||||
|
||||
function login(username: string, password: string, run?: (state?: number) => void) {
|
||||
const req = new XMLHttpRequest();
|
||||
req.responseType = 'json';
|
||||
|
Loading…
Reference in New Issue
Block a user