Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hide_key query parameter #95

Closed
wants to merge 1 commit into from
Closed

Conversation

cgsdev0
Copy link

@cgsdev0 cgsdev0 commented Sep 5, 2024

Related discussion: #65 (comment)

I haven't tested this change yet, but this is roughly what I am proposing.

@cgsdev0 cgsdev0 mentioned this pull request Sep 5, 2024
@@ -134,6 +134,11 @@
encrypt = await Encrypt.new(key);
const encryptedZeros = await encrypt.zeros();

const searchParams = new URLSearchParams(window.location.search);
if (searchParams.get("hide_key") === "true") {
window.location.hash = "";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: this will break if onMount runs more than once here

i'm operating under the assumption that it only happens once; would appreciate insight

@ekzhang
Copy link
Owner

ekzhang commented Sep 10, 2024

Hi @cgsdev0 -- if you are editing the URL bar, does it make sense to just edit out the URL?

@cgsdev0
Copy link
Author

cgsdev0 commented Sep 10, 2024

Hi @cgsdev0 -- if you are editing the URL bar, does it make sense to just edit out the URL?

maybe I'm wrong (traveling atm so I can't test), but I think manual edits to the URL bar are not very persistent. like if i switch to another tab and come back, does the edit stay? also refreshing would bring it back

it's also very possible i'm over thinking this

@cgsdev0
Copy link
Author

cgsdev0 commented Sep 11, 2024

hmm it does seem to persist more than I thought, maybe that will work good enough

thanks!

@cgsdev0 cgsdev0 closed this Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants