damus.io

damus.io website
git clone git://jb55.com/damus.io
Log | Files | Refs | README | LICENSE

commit 20a18ab95af02fcdba438edf7e89538eeda4d050
parent 897d837bf2e50cba4aaf4a48aa54da4ebc6f3d27
Author: William Casarin <jb55@jb55.com>
Date:   Sat, 12 Nov 2022 10:41:42 -0800

web: remove pk querystring when logging out

Diffstat:
Mweb/damus.js | 4+++-
Mweb/index.html | 2+-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/web/damus.js b/web/damus.js @@ -914,7 +914,9 @@ function render_deleted_comment_body(ev, deleted) { function press_logout() { if (confirm("Are you sure you want to logout?")) { localStorage.clear(); - location.reload(); + const url = new URL(location.href) + url.searchParams.delete("pk") + window.location.href = url.toString() } } diff --git a/web/index.html b/web/index.html @@ -66,7 +66,7 @@ <script src="noble-secp256k1.js?v=1"></script> <script src="bech32.js?v=1"></script> <script src="nostr.js?v=6"></script> - <script src="damus.js?v=68"></script> + <script src="damus.js?v=69"></script> <script> // I have to delay loading to wait for nos2x const relay = setTimeout(damus_web_init, 100)