add backwards navigation

pull/61/head
Harvey Tindall 4 years ago
parent ee026714d4
commit ce98b2eb5a
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -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…
Cancel
Save