diff --git a/docs_v1.0/doc_wasm/index.html b/docs_v1.0/doc_wasm/index.html index b286e78..b253984 100644 --- a/docs_v1.0/doc_wasm/index.html +++ b/docs_v1.0/doc_wasm/index.html @@ -148,8 +148,13 @@ async function init() { listEl.appendChild(a); }); document.getElementById('logout-btn').onclick = async function(e) { - await fetch('/api/v1/auth/logout', {method:'POST'}); - window.location.reload(); + e.preventDefault(); + e.stopPropagation(); + try { + await fetch('/api/v1/auth/logout', {method:'POST'}); + } catch(_) {} + el.innerHTML = '

Logged out. Session cleared.

'; + document.getElementById('logout-btn').style.display = 'none'; }; var hash = location.hash.slice(1); await loadDoc(hash || '01_auth'); @@ -158,11 +163,6 @@ async function init() { } } -window.onpopstate = function() { - var hash = location.hash.slice(1); - if (hash) loadDoc(hash); -}; - init();