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

Hide code via urlParameter doesn't work anymore #294

Open
PLNech opened this issue Mar 4, 2024 · 3 comments
Open

Hide code via urlParameter doesn't work anymore #294

PLNech opened this issue Mar 4, 2024 · 3 comments

Comments

@PLNech
Copy link

PLNech commented Mar 4, 2024

Hey amazing hydra team! I used to be able to hide code by default in my created works on hydra.ojack.xyz with &show-code=false.
I see that it doesn't work anymdraore in previous links I had shared, and indeed the code for that param seems commented:

// this.show()
// // // TO DO: add show code param
// let searchParams = new URLSearchParams(window.location.search)
// let showCode = searchParams.get('show-code')
// if (showCode === "false") {
// this.hide()
// }

Do you know why? I'd love to have this feature again - Happy to brush off my web skills and do a little PR for hydra if you think it's welcome 🤗

@ojack
Copy link
Member

ojack commented Mar 4, 2024

it should work with 'showCode=false'!

we should make it work with 'show-code' also

@PLNech
Copy link
Author

PLNech commented Mar 4, 2024

Ah nice, indeed this works! I'll use this for new creations 🤗

As for supporting the old syntax, good idea it would fix already shared links 😁

Thank you @ojack for the super quick reply 🙏

@ojack
Copy link
Member

ojack commented Mar 4, 2024 via email

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

No branches or pull requests

2 participants