mirror of
https://github.com/hrfee/jfa-go.git
synced 2025-01-03 15:00:12 +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) {
|
if (lang) {
|
||||||
tab += "?lang=" + 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) {
|
function login(username: string, password: string, run?: (state?: number) => void) {
|
||||||
const req = new XMLHttpRequest();
|
const req = new XMLHttpRequest();
|
||||||
req.responseType = 'json';
|
req.responseType = 'json';
|
||||||
|
Loading…
Reference in New Issue
Block a user